Case 1: The variable already exists and the user wants to save it on a history file.
If the field is in the Master Field List (see Table 2.13), the user must modify the code by uncommenting the outfld call for that field and must also add it to the history output via namelist variables PRIMARY or AUXF. PRIMARY will place the field on the primary history file, while AUXF will place the field on an auxiliary file, as described in Table 2.5.
If the field is not on the Master Field List, the user must add it to the list by modifying bldfld. Within bldfld, fields are added to the Master Field List by calling addfld. Four pieces of information are passed to addfld in an argument list:
call addfld('PS ','PA ',nf,nsingl,active)
call addfld('T ','K ',nf,nmultf,active)
The user must then add an outfld call for the field at the proper location in the code. This means that outfld must be called either from linemsbc, linemsac, or from a routine below either one in the calling tree. For example, the outfld call for the field T, taken from linemsbc, is shown below:
call outfld('T ',t3m1,plond,lat,hbuf)
The arguments in the call to outfld are the 8-character field name, the variable array in which it is stored, the first dimension of the data array, the latitude index, and the name of the history buffer. In adding a call to outfld, the user need only modify the first three arguments in the list (the last two will always be lat and hbuf).
Once these steps are taken, the field may either be added to a history file using namelist variables PRIMARY or AUXF, or removed from the history file via the namelist variable EXCLUDE.
Case 2: The variable is new and diagnostic in nature.
The new field should be in a user-defined local array or in the model buffer, if the information needs to be carried across time levels. To add a field to the model buffer requires the following steps:
Questions on these pages can be sent to... firstname.lastname@example.org .