Closed angus-g closed 2 years ago
Hello @angus-g! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:
Seems a straightforward change.
Just to be explicit, would this have let to different behaviour if input_type
is set incorrectly?
That's right, input_type = 'r'
will try to start the run from the restart files, and input_type = 'n'
will ignore any restart files and start a fresh run.
Huh, interesting. Not the same behaviour as MOM5 and other FMS models I guess. I'll merge.
What do the other models do with that parameter?
MOM5 at least didn't use it. Just reads in restart files that are either initial conditions or restarts from a previous run. In some cases if the restarts don't exist then it initialises to an "ideal state".
Many (most?) models seem to have flags which indicate an initial or continuing run (UM, CICE come to mind), but I've always found it to be a pain, just another state flag to set, when it should be possible for the model to intuit state as MOM5 does.
I believe MOM6 (or is it FMS) supports the a
argument, which does some sort of autodetection. Not sure on the exact rules though.
Using the mechanism to point to an external restart directory:
doesn't modify the experiment counter, because as far as payu is concerned, this is the first run. This breaks the logic the MOM6 module was using to determine whether to flag a run as a restart or not. In the case that the prior restart path has been set, we want to explicitly perform a restart run.
Thanks to @julia-neme for (unfortunately) finding this!