ufs-community / ufs-weather-model

UFS Weather Model
Other
129 stars 238 forks source link

Ensure restart-at-end functionality is working in CMEPS #2236

Open junwang-noaa opened 1 month ago

junwang-noaa commented 1 month ago

Description

This UFS WM issue is related to CMEPS issue https://github.com/NOAA-EMC/CMEPS/issues/118. It will allow UFS WM to write out CMEPS restart files at the end of whole integration.

Solution

Alternatives

Related to

dpsarmie commented 4 weeks ago

First suggestion was to test the functionality and see where it is work correctly/incorrectly:

This has been tested and atmwav_control_noaero_p8 is able to produce restarts at the end of the run. Further tests with datm_cdeps_control_gefs show that mom and cice is not producing end of run restart files.

Denise suggested looking into if the alarm is being set correctly for mom and cice and I'll be starting there.

DeniseWorthen commented 4 weeks ago

@dpsarmie I thought the mediator was producing the restart file in the datm test, for example DATMGEFS*.r.2011-10-02-10800.nc, which is an 24 + 3 hours restart but that mom and cice were not?

dpsarmie commented 4 weeks ago

@DeniseWorthen, yes that's the case. I'll edit my previous comment.

These are the restart files produced for the test with output every 12h and an additional restart at 27h (the end of the run). image

dpsarmie commented 3 weeks ago

I've added PRs for the MOM and CICE fixes to the end of run restart issue. During testing I came across a functionality issue that may or may not need to be resolved.

In ufs.configure.datm_cdeps.IN, the configuration option _restartoption does not supersede the end of run restart. (i.e. if _restartoption is set to None or Never, an end of run restart file will still be created if _write_restart_at_endofrun_ was set to True.)

Should the code be changed to have _restartoption control all restarts or keep _restart_option_ as it currently is and only control the restart files that are written at a preset interval?

DeniseWorthen commented 3 weeks ago

@dpsarmie What component are you suggesting a code change may need to be made in? We have no use case for the restart options none or never, but CESM might, so we'd need to be careful about making a change that might impact them.

dpsarmie commented 3 weeks ago

@DeniseWorthen If we wanted restart_option = None to supersede the write_restart_at_endofrun option, then I would add a NUOPC attribute check in CMEPS, MOM, and CICE to make sure that restart_option is not set to none/never before doing the subsequent checks for the end of run restart.

But I can also see how restart_option is only for the interval restarts (since the other options are nhours/nminutes/etc.) and the argument can be made that restart_option should only control those interval restart files and write_restart_at_endofrun should be where the user should control the end of run restart files.