-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check CICE4 dump date during setup #540
Comments
I've looked more into how CICE in ESM1.5 decides when to write a restart, and will note what I found here. The First #ifdef AusCOM
call get_idate(ttime, newh, newd, newm, newy) Following the logic in the With these values, CICE calculates the current year of the simulation:
E.g. in the first year of a simulation, The number of elapsed months, days and hours are then calculated: elapsed_months = (nyr - 1)*12 + month - 1
...
elapsed_days = int(yday) - 1
elapsed_hours = int(ttime/3600) The Next, CICE checks whether the current time step is the start of a new year, month, or day: if (nyr /= nyrp) new_year = .true.
if (month /= monthp) new_month = .true.
if (mday /= mdayp) new_day = .true. And decides whether to write a restart based on the above values: select case (dumpfreq)
case ("y", "Y")
if (new_year .and. mod(nyr, dumpfreq_n)==0) &
write_restart = 1
case ("m", "M")
if (new_month .and. mod(elapsed_months,dumpfreq_n)==0) &
write_restart=1
case ("d", "D")
if (new_day .and. mod(elapsed_days, dumpfreq_n)==0) &
write_restart = 1
end select There are a few quirks:
|
I don't follow this bit ? There is no month_init or day_init so can't simulations only start at the beginning of the year ? |
Good question. A simulation can start on any day of the year, and CICE uses the These come from |
Oh I see. What about if we force I guess I don't want to spend too much time on this because hopefully it will be superseded by CICE5 in ESM1.6 ! |
That could work! Just not 100% sure if there are cases where people do want to modify it or not (I suspect probably not?) Other option I was thinking would be to add a I've got two trials of this here and here – the changes are fairly straightforward. When doing monthly runs with |
In ESM1.5, the CICE4 restart date settings can be incompatible with the run-length specified in the
config.yaml
. For example, CICE can be configured to write restarts at yearly intervals, while the run-length could be set one month. In this case, no restart will be written at the end of the run.In this situation, CICE would previously pick up the wrong restart in subsequent runs. This is addressed by #539, which causes payu to raise an error during setup when the restart file contains the wrong date. This requires two runs before the user is informed that something is wrong with their configuration.
Ideally, we would inform the user at the very start of the first simulation that their run will not produce a valid restart, by comparing the dump settings (
dumpfreq
,dumpfreq_n
) with the run-length.To implement this, we'll need to properly understand how the dump dates are set within CICE4 in ESM1.5. Based on the code in ice_calendar.F90, it appears that CICE will write restarts when it crosses the boundary of a month or year, instead of using
dumpfreq
directly as a duration. E.g. the following shows the restarts produced by running 6 month-long runs withdumpfreq=m
, followed by a year length simulation withdumpfreq=y
:The text was updated successfully, but these errors were encountered: