Calendar mismatch in nudged simulation


I am converting an existing suite to run for an earlier period so have altered several ancillaries related to land surface. My suite u-cf808 stops with an error in the atmos_main task that seems to be related to one of the ancillaries, but I can’t seee any clues to help me identify which it might be.

The error is evident in the logs and the pe_output file:

I have also changed the AINITIAL file using the change_dump_date utility, but this worked as expected previously.

Could you please advise me how to identify the problematic ancillary?




Further to my problem with suite u-cf808, I have reviewed cms trac ticket #2989
where Luke pointed out (comment 22) this sort of error is related to UKCA emissions. The ancillaries mentioned in that old ticket were updated and have been used without error in many nudged simulations.

In comment 11 of ticket #2989, Simon advised me to adjust how initial ozone data was read from the ancillary and these adjusted settings have been carried through to suite u-cf808.

My problem is I can’t see from the job.err, job.out nor pe_output which ancillary might be causing the error.



Hi Leighton

The problem looks to be with an emissions netCDF ancil file, probably one of the ones in this directory


All of these files are for a 360 day calendar and your job is for a real calendar so I’m guessing that none of them will work. Maybe look at an existing working suite to see what is different.

If you want to find out which file is causing the error message I suggest you put a print statement in routine em_fopen in file atmosphere\UKCA\emiss_io_mod.F90 to print out variable filename


Hi Leighton, Jeff,

So long as the files are monthly and have the NetCDF attribute calendar_flexible set to 1 then they will be able to work in Gregorian calendar runs. You can also edit the metadata in the file to allow this using ncatted, e.g.

ncatted -O -a calendar_flexible,time,o,l,1 

Note that this would overwrite the original file.

You can use ncdump to look at the headers and work out which files, if any, have the incorrect setting.

Best wishes,


All the files in directory u-cf808/share/data/etc/ancil_ukca are symbolic links to standard files in umshared and checking with ncdump shows none of them have the calendar_flexible attribute.


Hi Jeff, Luke,

Thanks for pointing out the /share/data/etc/ directory. I’ve not explored that until now.

I carefully compared list of ancillaries in the ancil_ukca and ancil directories with those in a very similar working suite u-ce487. The ancillaries in these folders are identical, so are probably not the problem, so putting a print statement in the emiss_io_mod.F90 may not point to the problem.

I have only changed a handful of ancillaries, because the files in suite u-ce487 are for projections and start at 2015, earlier than my suite u-cf808 will run:


and the volcanic radiative property files:

Looking at the volcanic files, I can see they use a 360 day calendar, whereas my working suite uses files with a gregorian calendar.

I have copied these files and attempted to change the calendar attribute of the time variable using:
ncatted -O -a caldendar,time,o,c,“gregorian”
but I’m clearly not using ncatted correctly. Is it clear what I’ve done wrong here?



According to NCO documentation, my problem with renaming using ncatted may be due to netcdf version, but I’m unsure how to use the workaround (converting to netcdf3 then back to 4) and am concerned what that might do to the files.

What do you advise?



Hi Leighton

Putting a print statement in emiss_io_mod.F90 will tell what file the error message refers to.

Assuming you got the same error message I did when running ncatted

ERROR: nco__open() unable to open file "./"
ERROR NC_EHDFERR Error at HDF5 layer

I found doing it this way worked

ncatted -O -a calendar,time,o,c,“gregorian” -o

I’ve no idea what the problem with ncatted is.

By the way you mis-spelled calendar in your ncatted command.


Thanks Jeff, this command works now. I’ll rerun my suite with the updated ancillaries and confirm if it works.



Hi Jeff,

I wanted to confirm that your suggested adaptation of the ncatted command worked fine. It didn’t solve my problem, so I inserted a write command in the em_fopen routine as you suggested and this helped identify the problematic ancillary.

My suite is now running as expected.

Thanks for your help,