Skip to content

allow repeat_run from a restart defined in config.yaml #580

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

anton-seaice
Copy link
Contributor

Contributes to #576

This enables the repeat option to be used with previous restart files to start (rather than always assuming they are starting from an initial condition).

Ad-hoc testing only. This works with the access-esm1.6 driver now. I've assumed that users specify the restart in config.yaml and do not already have restart's in their archive directory.

@anton-seaice anton-seaice requested a review from jo-basevi May 23, 2025 06:12
@coveralls
Copy link

Coverage Status

coverage: 58.715% (+0.2%) from 58.539%
when pulling e20d8c6 on 576-repeat_run
into 028805b on master.

@@ -114,7 +114,7 @@ def init_config(self):

input_nml = f90nml.read(input_fpath)

if ((self.expt.counter == 0 or self.expt.repeat_run) and
if ((self.expt.counter == 0) and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the original line with or self.expt.repeat_run worked for situations where there isn't a restart: in config.yaml, but we still want to repeatedly start from initial conditions/a cold start? With repeat run, the experiment counter still increments for each subsequent run.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it should just be :

if ( self.prior_restart_path is None ):
            input_type = 'n'

?

Is prior_restart_path used for both restart paths specified in config.yaml and those generated during payu runs ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it probably could just be if self.prior_restart_path is None.

Is prior_restart_path used for both restart paths specified in config.yaml and those generated during payu runs ?

Yup, that's correct. The base prior_restart_path is set as part of the Experiment class initialisation to either None, restart directory in config.yaml or an restart in the archive, and then passed to the various model drivers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants