Skip to content
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

Restart date consistency across submodels #495

Open
blimlim opened this issue Aug 28, 2024 · 1 comment
Open

Restart date consistency across submodels #495

blimlim opened this issue Aug 28, 2024 · 1 comment

Comments

@blimlim
Copy link
Contributor

blimlim commented Aug 28, 2024

#484 added a new cice restart date file to clarify which date cice starts each simulation during runs of ESM1.5. This was added to partly address the leap year crashes caused by cice inadvertently using a different start date than the other model components, see #466 for details.

While the above changes make the cice start dates easier to read, they don't actually stop the sub-models from being out of sync, i.e. it's still possible for each model to have a different start date.

To close off #484 I think it would be useful to add a consistency check during the setup stage, which checks each sub-model's start date and raises an error if they aren't all the same. We could add a get_restart_date method to each model, and in the experiment.setup stage check that each model's start date matches:

    model_start_dates = []
    for model in self.models:
        try: 
            model_start_dates.append(model.get_restart_date())
        except AttributeError: # For models which we haven't added a get_restart_date method to

    # check that everything in model_start_dates matches and raise an error if not
   ...

This would let us add similar consistency checks to other multi-component models down the line if it seemed helpful.

Would this approach be ok? Another option would be to have all everything in the access driver if we don't think similar checks would be useful for any other models.

@aidanheerdegen
Copy link
Collaborator

Agreed that we need these checks.

I like the idea of having a method like .get_restart_date() for models.

Not at all models have to define the function if it isn't useful for them.

A consistency check is the first step. Logically we should also have a .set_restart_date(), in which case it would be straightforward to enforce consistency if that was what the user wanted to do. That would be something to tackle later I think.

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

No branches or pull requests

2 participants