# ESM ancillary file timesteps

**URL:** <https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659>\
**Category:** Earth System\
**Tags:** help-needed\
**Created:** [6 April 2023 02:09 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659 "2023-04-06T02:09:13Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [6 April 2023 02:09 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/1 "2023-04-06T02:09:13Z")

</div>

Hi everyone!

I’m currently converting some modified SST ancillary files to use with the ESM1.5 - AMIP configuration. The source files are set up for CAM6, and have data exactly half way into each month (e.g. on March 15.5, April 15, May 15.5 etc each year).

However the data for the default SST ancillaries for the ESM AMIP configuration lie exactly 15.5 days into each month, independent of the month’s length. I was wondering if anyone knows how flexible the UM7.3 is for the ancillary time steps, i.e. does it require the data to occur 15.5 days into each month, or will it be fine to use the different time steps from the CAM6 files? I’ve tried looking into the documentation but haven’t found anything yet.

The reason I’m hoping to keep the CAM6 time steps is that the data has already been “diddled” so that it will recover the observed monthly means, and I’m hoping to avoid redoing that.

This does lead into a follow up question. The CAM6 data uses a 365 day calendar with no leap years, rather than the Gregorian calendar that ESM is using. I was wondering if anyone knows whether the differences that would occur in February on leap years would require the diddling to be redone, or if it would be small enough to safely ignore?

Thank you for your help!  
Spencer

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [13 April 2023 03:20 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/2 "2023-04-13T03:20:49Z")

</div>

@atteggiani this is the question I had about the ESM calendar, it’s been suggested that I tag you here! Thank you for your help!

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [14 April 2023 00:46 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/3 "2023-04-14T00:46:53Z")

</div>

Hi Spencer,

The UM has an option to update your ancillary files every chosen timestep.  
In the `<esm_folder>/atmosphere/prefix.CNTLATM` file there is the following section:

```auto
 &ANCILCTA
 L_SSTANOM=.FALSE.,
 LAMIPII=.TRUE.,
 /
 &UPANCA ANC_REF_NO=X, PERIOD=Y, INTERVAL=Z /
 &UPANCA ANC_REF_NO=X, PERIOD=Y, INTERVAL=Z /
 ...

```

where:

- `ANC_REF_NO` refers to the ancillary file entry number (second number in the first line of each ancillary entry, the first number is always 1) listed in the ANCILmaster file `~access/umdir/vn7.3/ctldata/ANCILmaster/ANCILfields_A`.

- `PERIOD` is the update period among (`1` for Years, `2` for Months, `3` for Days, `4` for Hours)

- `INTERVAL` is the number of timesteps that you want, relative to the period specified above.

So, for example, if you want to update your ancillary file every 5 days, you would have `PERIOD=3, INTERVAL=5`. If you wanted to update your ancillary file every 2 hours, you would have `PERIOD=4, INTERVAL=2`.

As you can see in the file, the Sea-Surface Temperature (STASH code 24, last number before the name) is the entry number 28:

```auto
#===============================================================================
#
1| 28 | 1 | 0 | 24 |Sea-Surface Temperature |
2| 6 |
#

```

With this in mind, in the `prefix.CNTLATM` file’s section mentioned above, you can search for `ANC_REF_NO=28` and check what is the current update scheme.

What UM does, is a linear interpolation of the ancillary data onto the model time, at every chosen update timestep, and keeps that value constant for the other timesteps.  
This means that, in your case, the leap years would not generate too much of a difference because the ancillary data for it would still be an interpolation with the closest ancillary timesteps (mid Feb and mid March). Your only decision is if you want the ancillary to keep a rather constant value for all the month (being equal to more or less the mean between each 2 consecutive mid-month values), in that case you can choose to update your ancillary every month. Otherwise, you can increase the frequency of the interpolation to add more variability within a month, by interpolating every day, or anything in between.

As a rule of thumb, unless you require a specific scheme for a particular reason, I would just check the current scheme and stick with it as a test.

Hope that helps.

Davide

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [14 April 2023 01:26 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/4 "2023-04-14T01:26:53Z")

</div>

Hi Davide,

Really appreciate you looking this, this is exactly what I was hoping to find out! Just to make sure I’m understanding correctly, if for example PERIOD=3 and INTERVAL=5, the model will compute a value from the linear interpolation once every 5 days, and hold that value constant in between the updates?

Again thanks for your help with this!

---

<div class="post-metadata">

**Author:** ![atteggiani](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/atteggiani/32/212_2.png) [@atteggiani](https://forum.access-hive.org.au/u/atteggiani)\
**Post date:** [14 April 2023 01:39 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/5 "2023-04-14T01:39:54Z")

</div>

That’s exactly what it does!

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [14 April 2023 05:47 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/6 "2023-04-14T05:47:44Z")

</div>

The AMIP SST corrections are set up so that you get the correct monthly mean value out of the model when you update the SST ancillary once a day. It may be a good idea to check the monthly mean SST output from your model matches the input4mips data as a confirmation that everything is working correctly.

[https://code.metoffice.gov.uk/trac/ancil/wiki/CMIP6/ForcingData/SstSeaIce](https://code.metoffice.gov.uk/trac/ancil/wiki/CMIP6/ForcingData/SstSeaIce)

---

<div class="post-metadata">

**Author:** ![zoegillett27](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zoegillett27](https://forum.access-hive.org.au/u/zoegillett27)\
**Post date:** [16 April 2023 08:52 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/7 "2023-04-16T08:52:48Z")

</div>

Hi all,

I have a question similar to Spencer’s. I would like to create a monthly climatology of my ACCESS-CM2 model output that is preserved when the model interpolates to daily values ([AMIP](https://pcmdi.llnl.gov/mips/amip/)).

Scott, in the link you have provided, it looks like there might be a package that can do this (or maybe it only converts to a UM ancillary type file). Do you or others have any experience with doing this?

Thanks,  
Zoe

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [17 April 2023 03:35 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/8 "2023-04-17T03:35:18Z")

</div>

Hi Zoe,

The code in the Met Office link will work with UM ancillary files only. You could convert your dataset to Ancillary format with [xancil](http://climate-cms.wikis.unsw.edu.au/UM_Ancillary_files#Creating_Ancil_Files) or [ants](https://code.metoffice.gov.uk/doc/ancil/ants/latest/introduction.html) and use the UM scripts. I don’t know of a version that processes netcdf files, though one may exist.

Some more references that may help  
[https://pcmdi.llnl.gov/mips/amip/amip2/AMIP2EXPDSN/BCS\_OBS/amip2\_bcs.html](https://pcmdi.llnl.gov/mips/amip/amip2/AMIP2EXPDSN/BCS_OBS/amip2_bcs.html)  
[https://pcmdi.llnl.gov/mips/amip/amip2/AMIP2EXPDSN/BCS/amip2bcs.html](https://pcmdi.llnl.gov/mips/amip/amip2/AMIP2EXPDSN/BCS/amip2bcs.html)

---

<div class="post-metadata">

**Author:** ![zoegillett27](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zoegillett27](https://forum.access-hive.org.au/u/zoegillett27)\
**Post date:** [17 April 2023 04:46 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/9 "2023-04-17T04:46:13Z")

</div>

Thanks Scott, I will have a go at using the UM scripts to do that.

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [17 April 2023 09:08 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/10 "2023-04-17T09:08:52Z")

</div>

Thanks everyone, it looks like I’ll be needing to similarly run the process to generate the boundary conditions instead of regridding the already processed data. I think Julie’s colleagues in the US who created the data I’m using have their own routine for doing this. I’ll ask them how flexible that is in terms of using different grids, and can let you know @zoegillett27 if it could also be usable.

---

<div class="post-metadata">

**Author:** ![zoegillett27](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zoegillett27](https://forum.access-hive.org.au/u/zoegillett27)\
**Post date:** [18 April 2023 23:31 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/11 "2023-04-18T23:31:58Z")

</div>

Thanks Spencer, that would be great to know. I found a package to generate the climatology with CESM but haven’t tried to use it - see [CESM\_BC/bcgen.f90 at master · duochanatharvard/CESM\_BC · GitHub](https://github.com/duochanatharvard/CESM_BC/blob/master/bcgen/bcgen.f90).

Scott, have you used the UM scripts to generate an adjusted 12-month SST climatology? It’s not clear to me how to run them and which ones I need to use.  
In the anc\_control\_amip4cmip6.py file, the SST/sea ice inputs appear to be netcdf files.

Thanks,  
Zoe

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [19 April 2023 00:14 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/12 "2023-04-19T00:14:00Z")

</div>

I’ve not used the scripts in some time and I no longer have my notes from when I did so unfortunately

---

<div class="post-metadata">

**Author:** ![spencerwong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/spencerwong/32/1894_2.png) [@spencerwong](https://forum.access-hive.org.au/u/spencerwong)\
**Post date:** [24 April 2023 06:28 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/13 "2023-04-24T06:28:22Z")

</div>

Hi Zoe thanks for sending through this github. Apparently this is the same code that Julie’s colleagues were using. I think I’ve managed to get it working, but am working on getting the “tayloring\_simulator” code from the met office to run, so I can check whether the output is ok. I can write up what I needed to do to get the diddling code running if that would be useful

---

<div class="post-metadata">

**Author:** ![zoegillett27](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zoegillett27](https://forum.access-hive.org.au/u/zoegillett27)\
**Post date:** [16 May 2023 05:39 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/14 "2023-05-16T05:39:44Z")

</div>

Hi all,

I wanted to follow up on this question regarding the time steps.

We’ve (mostly Spencer!) been working on the code to create an adjusted SST/sea ice climatology file to force an ESM AMIP experiment (or in my case to use in a pacemaker experiment with CM2). We’re using the package designed for [CESM(CAM)](https://github.com/duochanatharvard/CESM_BC) as it seems more user friendly.

The time dimension for the SST/sea ice input files is quite confusing. As Spencer said above, the ESM SST input file (/g/data/access/payu/access-esm/input/amip/amip\_sst\_n96\_greg.pp) has time steps on the 16th of each month [1870-01-16 12, 1870-02-16 12, …].

The CM2 SST input file (/g/data/access/TIDS/CMIP6\_ANCIL/data/ancils/n96e/timeseries\_1870-2016/SstSeaIce/seaice\_amip\_n96e.anc) is slightly different and has time steps at [1870-01-16, 1870-02-16, …]. (I’m not quite sure why these are different and where to find where the model updates the ancillary files in CM2.)

For my CM2 experiments where I prescribe a 12-month SST climatology (much like the piControl-clim experiment [suite br931]), I have been using a different time step again: [0000-01-16, 0000-02-14,0000-03-14 12,0000-04-14,0000-05-14 12,0000-06-14,0000-07-14 12,0000-08-14 12,0000-09-14,0000-10-14 12,0000-11-14 12,0000-12-15].

(1) Does the value of this time step matter? Or as Davide explained, will the model deal with it when it interpolates the monthly SST/sea ice climatology to daily values?  
I previously did a one-year test using different time steps and I got slightly different results.

(2) The calendar associated with these variables is 360\_day (at least for CM2, it doesn’t say for ESM). The model uses a Gregorian calendar, so what should we do here?

Thanks for your help,  
Zoe

---

<div class="post-metadata">

**Author:** ![Scott](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/scott/32/37_2.png) [@Scott](https://forum.access-hive.org.au/u/Scott)\
**Post date:** [16 May 2023 06:39 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/15 "2023-05-16T06:39:15Z")

</div>

It’s possible that the Hadgem ancillaries were used directly for the ACCESS runs (Hadgem uses the UM with 360 day calendar).

The value will matter somewhat as it’s affecting when the endpoints of the linear interpolation are. Someone else may be able to say how significant the effect is, or you could do an experiment and check looking at a single gridpoint how changing the time bounds changes the monthly means when doing a linear interpolation sampled daily.

The model can be set to ignore the calendar in an ancil file, could be what’s happening in point 2.

---

<div class="post-metadata">

**Author:** ![zoegillett27](https://avatars.discourse-cdn.com/v4/letter/z/74df32/32.png) [@zoegillett27](https://forum.access-hive.org.au/u/zoegillett27)\
**Post date:** [16 May 2023 23:18 UTC](https://forum.access-hive.org.au/t/esm-ancillary-file-timesteps/659/16 "2023-05-16T23:18:24Z")

</div>

Thanks Scott.

Got it. I agree that the time steps will matter somewhat, but it’s tricky to know what is the correct values to use.

Good to know. Yes I’ve seen that `use_lookup_dates_anc_time_interp` is used in AMIP runs (do you know what it replaces the calendar with?), but not in coupled runs, so I’m not sure if it can be applied in my case where I’m only removing the coupling in a particular region by prescribing SSTs there.
