-
Notifications
You must be signed in to change notification settings - Fork 13
First run I/O #664
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
base: main
Are you sure you want to change the base?
First run I/O #664
Conversation
| Args: | ||
| t (float): the start time of the run | ||
| tmax (float): the end time of the run | ||
| pick_up: (bool): specify whether to pick_up from a previous run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing from the docstring
gusto/timestepping/timestepper.py
Outdated
| logger.debug(f'{field_name}, min: {min_val}, max: {max_val}') | ||
|
|
||
| def run(self, t, tmax, pick_up=False): | ||
| def run(self, t, tmax, pick_up=False, first_run=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's not really my place to review Gusto code but I feel this might be more elegant if this were called init_io or similar. Or you could even set this attribute inside Timestepper.__init__.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is a nice idea @connorjward - thanks! your comments are always appreciated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Connor!
This PR changes the set-up of characteristics of the I/O. It adds a
first_runflag to the time stepper'srunmethod, which isTrueuntil the components of the I/O have been set up, after which it becomesFalse. This is to facilitate solving a PDE in Gusto multiple times as part of a hybrid ML model.