Closed angus-g closed 9 months ago
An example from MOM6 0.25 global config with a few more names:
&MOM_input_nml
output_directory = '.',
input_filename = 'n'
restart_input_dir = 'INPUT',
restart_output_dir = 'RESTART',
parameter_filename = 'MOM_input',
'MOM_layout',
'MOM_saltrestore',
'MOM_override'
/
&SIS_input_nml
output_directory = './',
input_filename = 'n'
restart_input_dir = 'INPUT/',
restart_output_dir = 'RESTART/',
parameter_filename = 'SIS_input',
'SIS_layout',
'SIS_override' /
It might be tricky initialising the allowable config files dynamically, as this is set in __init__()
and config files are generally parsed in setup()
.
Could be worth checking at setup()
that all the files listed in parameter_filename
exist in set(self.config_files, self.optional_config_files)
and emitting a warning/error if not. Presumably the model will crash in this instance though, as the config file will be missing from the work
directory, but better to give a nice informative error maybe.
At the moment, the list of parameter filenames for MOM6/SIS2 is hardcoded: https://github.com/payu-org/payu/blob/3f00d4b72390053ab9182e340c582fbd0a67683f/payu/models/mom6.py#L39-L55
For the non-FMS components of these models, the filenames are actually specified in the
input.nml
, under theparameter_filename
entry of theMOM_input_nml
andSIS_input_nml
namelists: