Calendar mismatch in nudged simulation

Hello,

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:
/work/n02/n02/lre/cylc-run/u-cf808/work/20091201T0000Z/atmos_main000/pe_output

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?

Thanks,

Leighton

Hello,

Further to my problem with suite u-cf808, I have reviewed cms trac ticket #2989
http://cms.ncas.ac.uk/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.

Thanks,

Leighton

Hi Leighton

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

/work/n02/n02/lre/cylc-run/u-cf808/share/data/etc/ancil_ukca

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

Jeff.

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 CH4_biomass_low_2014_2020_time_series.nc 

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,
Luke

Hi

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.

Jeff.

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:

$CMIP6_ANCILS/model_derived/ukesm1.0_historical_r5i1p1f3_u-az513/n96e/timeseries_1979-2014/vegetation/v1/u-az513_m01s00i216_1979-2014_annual_timeseries_land_cover_frac.anc
$CMIP6_ANCILS/model_derived/ukesm1.0_historical_r5i1p1f3_u-az513/n96e/clim_1979-2014/vegetation/v1/u-az513_m01s00i218_1979-2014_time_mean_canopy_height.anc
$CMIP6_ANCILS/model_derived/ukesm1.0_historical_r5i1p1f3_u-az513/n96e/clim_1979-2014/vegetation/v2/u-az513_m01s00i217_1979-2014_monthly_climatology_LAI.anc

and the volcanic radiative property files:
/work/y07/shared/umshared/cmip6/ancils/n96e/timeslice_2014/volc*nc

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” test.nc
but I’m clearly not using ncatted correctly. Is it clear what I’ve done wrong here?

Thanks,

Leighton

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.

http://nco.sourceforge.net/nco.html#bug_nc4_rename

What do you advise?

Thanks,

Leighton

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 "./test.nc"
ERROR NC_EHDFERR Error at HDF5 layer
 ...

I found doing it this way worked

ncatted -O -a calendar,time,o,c,“gregorian” test.nc -o test2.nc

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

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

Jeff.

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

Cheers,

Leighton

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,

Leighton