Create an AMIP restart from a coupled restart

This topic describes the method used to create an AMIP restart for ACCESS-ESM1.6 starting from a coupled restart. In this case, we start from a restart of a pi-control simulation.

The restart files for coupled simulations contain coupled fields that are not needed for AMIP simulations and will cause the simulation to error when reading the restart.

1. Identify the coupled fields ID

  • Run the simulation with the couple restart.
  • After the simulation stops, go to work/atmosphere and run:
module load conda/analysis3
python -i  ~access/apps/pythonlib/umfile_utils/access_cm2/prog_fields_mismatch.py atm.fort6.pe0 restart_dump.astart

No. of prognostic fields in start file: 3640
Expected no. of prognostic fields:      3517

Unexpected fields in restart [95, 171, 172, 173, 174, 176, 177, 178, 179, 180, 181, 184, 185, 186, 187, 188, 189, 192, 250, 413, 414, 415, 416, 33001, 33002]

The list of unexpected fields return is the list of fields to remove.

2. Removing the coupled fields

  • Copy the restart directory from a coupled simulation and remove the ocean, ice and coupler restarts.
cp -r <existing-restart-location>  <new-restart-location>
rm -r <new-restart-location>/ocean
rm -r <new-restart-location>/ice
rm -r <new-restart-location>/coupler
  • Remove extra coupling fields from restart. Use the list of fields returned above as input to um_fields_subset.py.
module use ~access/modules
module load pythonlib/umfile_utils/access_cm2

python ~access/apps/pythonlib/umfile_utils/access_cm2/um_fields_subset.py -x 95,171,172,173,174,176,177,178,179,180,181,184,185,186,187,188,189,192,250,413,414,415,416,33001,33002 -i <new-restart-path>/atmosphere/restart_dump.astart -o <new-restart-path>/atmosphere/newrestart

rm <new-restart-path>/atmosphere/restart_dump.astart 
mv <new-restart-path>/atmosphere/newrestart <new-restart-path>/atmosphere/restart_dump.astart 

3. Update the date in the restart file

  • AMIP simulations in CMIP start at 1978/01/01.
python ~access/apps/pythonlib/umfile_utils/access_cm2/change_dump_date.py <new-restart-path>/atmosphere/restart_dump.astart  <<< "1978 1 1"
# Update the date in the calendar file
sed -i "s/end_date:.*/end_date: 1978-01-01 00:00:00/" <new-restart-path>/atmosphere/um.res.yaml
P
2 Likes

@spencerwong @MartinDix @RachelLaw Since I needed these instructions recently and we had to dig them out of various communication, I thought it might be best to consolidate in one visible topic.

Can you check it’s correct?

I say it’s only for ESM1.6 because I don’t know if it applies to other models or not, please let me know if it’s more general than that.

Any other comments are welcome.

Thanks @clairecarouge for putting this together, these look correct to me!

1 Like

@clairecarouge - one issue I found was that if I’d done the module commands to use/load the umfile_utils, I was then picking up an old version of payu - so perhaps there needs to be a warning about that (or a fix).
At one point I also needed to specify python3 rather than just python. Can’t remember if that’s been the case in my most recent restart manipulations.

Thanks for the feedback @RachelLaw .

For the python3 issue, I have added the module load conda/analysis3 to fix that.

For the payu version, this is because payu is installed in the analysis3 environment but this has been removed from this month (so the unstable environment does not contain payu). Considering we are about to change month and the default conda/analysis3 will not contain payu, I think we don’t need to mention it anymore.

Sorry, my bad. We need to, I misread a 2024 for a 2025! The umfile_utils have a dependency on hh5! So they will break this week once the hh5 modules are gone.

I’ll raise this!