-
Notifications
You must be signed in to change notification settings - Fork 13
Restart file output specification
Name: Tim Spain
Affiliation: NERSC
Target/Actual Release Date/Project Milestone (delete as appropriate): Stand-alone model
Reviewers: Alex Smith, Kacper Kornet
GitHub Issue: #239
- Introduction
- Requirements
- Functional
- Architectura
- Implementation
- Integration
- Test Specification
- Documentation Impact
Currently a restart file is produced at the end of the run. It would be useful to be able to produce this at other times, either specified in the initial configuration or signalled by a coupled model, as I currently believe the NorESM coupling will do.
The ability to create more frequent restart files will help both developer debugging the physics code and users who are pushing the model into regimes where it may suffer from numerical crashes. Since the restart file output code already exists, there will be minimal impact on other components.
-
Introduce a new configuration value into the
[model]
section to specify restart file frequency, calledrestart_file_frequency
. This takes a Duration specification to determine the frequency with which restart files are created other than at the end of the model. -
The string
'NONE'
is a special case and the default and specifies that only the end of run file is to be created. This special value is not case sensitive. -
The possible forms of the Duration string are then:
-
'NONE'
,'none'
and any other variations in case:- Do not output any restart files apart from the one at the end of the run.
-
'P
Y
-
D
T
hh
:
mm
:
ss
'
:- Produce a restart file every _Y_×31536000 + _D_×86400 + _hh_×3600 + _mm_×60 + ss seconds after the start of the run.
-
'P
Y
-
M
-
D
T
hh
:
mm
:
ss
'
:- This form, explicitly including the month in the time value, should allow specification according to the calendar. In this case Y specifies a calendar year, including leap days, M is calendar months and D days of the month (so setting it to a value > 28 is probably a bad idea). Within the day, hh is hours in the day, mm minutes in the hour and ss seconds within the minute. The sub-day can be dropped (in both cases) especially when operating on the calendar basis.
-
In most cases only one unit of time should be non-zero.
-
Include a text feedback function to ensure that the input has been interpreted correctly during testing and also to give the user feedback during a model run.
-
The name of each restart file should be suffixed with the date in the form
YYYYMMDD_hhmm
. With a 600 second baseline for the timestep, we shouldn't need second granularity. The file name is thenrunname
.
YYYYMMDD
_
hhmm
.nc
.
An addition configuration option model.restart_file_frequency
will be added.
Additional file IO whenever a restart file is created. An additional line logged on configuration describing the output frequency and a log message every time a restart file is created.
Bung it into Model
somehow?
Certainly use the Model
configuration function, but the new class will parse the passed string.
No idea how or whither the new class signals that a restart file is due. Does Model
even need to get involved, or can all the data be obtained from Prognostic data?
Test the parsing of the frequency specification.
Test using a re-implementation of most of the model classes to observe that the expected restart file names are produced.
Document the new configuration option.
If we include documentation on what a restart file is, then a description of this option should be included.
The Model
class should return additional text in getHelpText()
giving a description of this option.
Feature Specifications By Component
-
General IO
-
Developer Tools
-
Model Architecture
Draft Component Specifications
- Coupling