Implement dump last in ESM1.6 driver#38
Merged
blimlim merged 2 commits intoaccess-esm1.6from Jun 4, 2025
Merged
Conversation
anton-seaice
reviewed
Jun 4, 2025
| write(il_out,*) '(calendar) idate = ', idate | ||
| #endif | ||
| if (istep >= npt+1) stop_now = 1 | ||
| if (istep == npt .and. dump_last) write_restart = 1 ! last timestep |
Collaborator
There was a problem hiding this comment.
Do we need to remove this line ?
Maybe put this in a #ifndef ACCESS to make this easier to merge with master in the future ?
anton-seaice
approved these changes
Jun 4, 2025
Collaborator
anton-seaice
left a comment
There was a problem hiding this comment.
looks good - thanks @blimlim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #37
This PR modifies the
dump_lastimplementation for the ESM1.6 driver. Rather than checking againstnpt(not used in ESM1.6), it setswrite_restart = 1in the last timestep of the control loop.Testing
To check whether it's writing restarts at the correct times with the correct data, I ran 3 simulations with
dump_last=.true.:dumpfreq='y'dumpfreq='y'dumpfreq='m'In each case,
dump_lastwould be responsible for writing the restart at the end of the run.And 3 runs with
dump_last=.false.for comparison:dumpfreq='m'dumpfreq='m'dumpfreq='d'The standard date-based checks would be responsible for writing the final restarts for these runs.
In each case, the end of run restart files match:
The coupler restart files also match for each pair of runs.