Go to the bottom of this page. See the search engine and sub-section links.
Go to next page Go to previous page Go to top of this section Go to top page Go to table of contents

Previous Section Headers

User's Guide to NCAR CCM3.6 Search Page


3. CCM3.6 Internals
    3.5 Output Datasets
        3.5.1 History Files


3.5.1.5 History File Code Flow

Many routines are involved in the initialization and writing of history files. Since it is difficult to track these routines within the code, a brief summary of the code flow pertaining to history files is given below.   Refer to the calling tree  in
Appendix B  to view the relative locations of the routines cited below.

Initialization of the history files occurs in several routines. Namelist variables associated with the history file controls are initialized in routine preset and read into the model in data. If a restart run is being conducted, existing history files that are not full (contain less than MFILT time samples) are opened and repositioned in routine restrt. Routine intht is the main driver routine that initializes new history files and determines the contents and size of the history buffer. This routine first calls bldfld to build the Master Field List (see Table 2.13) and fldlst to construct the history buffer using the Master Field List and the values of the namelist variables EXCLUDE, PRIMARY and AUXF. inthed then initializes the variables in the history file header common to all history files and intht dynamically allocates memory for the in-core history buffer or opens the SSD file necessary for the out-of-core history buffer. If any history buffer restart files exist (as may happen in a restart run) then splitg is called to read its contents into the in-core history buffer or the out-of-core SSD file. Finally, rgnhbf initializes the history buffer regeneration files (if needed).

Writing of the history fields to the buffer and writing of the history buffer contents to a history file, occurs from within the time integration loop of stepon. History fields are accumulated in the history buffer every timestep. However, as described in Sec. 2.2, a time sample is only written to the disk history file as directed by namelist variable NHTFRQ. The model sets logical variable hstwr to true if it is time to write a time sample to a given history file. Of the subroutines called by stepon, only scan1bc, scan1ac, and wrapup directly interact with the history buffer or files. Routine wrapup closes any full history files and archives them to the NCAR Mass Storage System if applicable.

Several common blocks are associated with the history files. These common blocks are defined in the following header files: comhst.h, comhed.h, commss.h, comlun.h and comloc.h.


 Go to the top of this page. See links to previous section headers.
Go to next page Go to previous page Go to top of this section Go to top page Go to table of contents

 Search for keywords in the CCM3.6 Users GuideSearch page

Questions on these pages can be sent to... erik@ucar.edu .


$Name: ccm3_6_6_latest2 $ $Revision: 1.38.2.1 $ $Date: 1999/03/25 21:38:49 $ $Author: erik $