Calculating climate means using the Gregorian calendar

The UM STASH system has the ability to calculate monthly and seasonal (and even longer period) means within the model run. However the Met Office run climate simulations with the 360 day calendar and the climate means work best with that. It is possible to generate climate means using the Gregorian calendar but it requires saving a dump file every day which is an unacceptable overhead. There's also no convenient way to get the model to save a dump file at the end of each calendar month, only at regular periods. The coupled model scripts work around this by editing the model control files to specify the dump steps according to the month lengths.

Only a relatively small change to the code is needed to allow the model to save dumps at the end of each calendar month and calculate the means over that period. With this scheme the model can only calculate monthly means, not seasonal and longer periods. However these are easily calculated in post-processing if required.

The new code is in the branch None of the files changed in this branch overlap with the changes in the VN7.3_cable_coupled or vn7.3-oasis3-rhill branches so there should be no problem merging them.

Job changes to run with this

A dump frequency of -9999 is used to signal dumping at the end of every calendar month (with either calendar). At the moment there's no support in the UMUI for setting this end of month dump frequency. Instead use the hand-edit file cherax:~dix043/umui_jobs/hand_edits/monthly_dump.ed (or accesscollab:~access/umui_jobs/hand_edits/access1.0/monthly_dump.ed). When using this it doesn't matter what the dump frequency is set to in the job. The regular climate meaning should be turned off.

In STASH settings use the regular TDMPMN time profile with mean period set to one dump period. Change the UPMEAN time profile to use a PP file rather than climate meaning (check that it's not used by any other stream in the job). Note that this means that the climate means will go to the specified file rather than to the pm file as before (possibly it could be made to use the same file as the regular climate means). For a run with the Gregorian calendar, the file reinitialization frequency should be set to 1 real month (RM in the initialization control panel), otherwise to 30 days.

In a normal monthly mean file the variables are ordered by their STASH section number. However in all other output files (including the new mean scheme) the section order is slightly different, 1, 2, 4, 6, 14, 12, 3, 5, 8, 9, .... 0.

It's unlikely that there's any post-processing code that relies on variable position rather than ID. However, the UM utility cumf used for comparing files does rely on position, so for the validation I had to split up the files by section.


Job xahoc is based on the standard HadGEM2 AMIP job xabae. xahof is a version using the new mean code. The normal climate mean STASH has 222 variables, 1965 single level fields 450 MB/month. Also 32 daily fields in the pa file and 5 in the pe file.


The model simulation with the new code is identical to the standard one (no difference in solver norm diagnostics after 3 months). There are roundoff level differences in mean fields. The largest RMS differences relative to the RMS of the base field were of order 2e-14.


Times are for 64 processors runs. Test runs used the 360 day calendar so comparison with the normal climate mean method was possible.

No output 1035 s
Normal climate mean with 10 day dumps 1150 s
Daily dump 1760 s
New code 1100 s

Use in the coupled model

Last modified 8 years ago Last modified on Oct 10, 2014 2:26:48 PM