The frequency at which data are written to a history file as well as the interval over which the time average is to be performed is controlled by the namelist variable histfreq. Data averaging is invoked by the namelist variable hist_avg. The averages are constructed by accumulating the running sums of all variables in memory at each timestep. The options for both of these variables are described in Table 1. If hist_avg is true, and histfreq is set to monthly, for example, monthly averaged data is written out on the last day of the month.