fre.pp.configure_script_yaml module
Script creates rose-apps and rose-suite files for the workflow from the pp yaml.
- fre.pp.configure_script_yaml.quote_rose_values(value: str) str
rose-suite.conf template variables must be quoted unless they are boolean or a list, in which case do not quote them.
- Parameters:
value (str) – rose-suite configuration value
- Returns:
quoted rose-suite configuration value
- Return type:
str
- fre.pp.configure_script_yaml.rose_init(experiment: str, platform: str, target: str) tuple[metomi.rose.config.ConfigNode, metomi.rose.config.ConfigNode, metomi.rose.config.ConfigNode]
Initializes the rose suite and app configurations.
- Parameters:
experiment (str) – Name of post-processing experiment, default None
platform (str) – Name of platform to use, default None
target (str) – Name of target ([prod/debug/repro]-openmp)
- Returns:
- rose_suite: class within Rose python library; represents
elements of the rose-suite configuration
- rose_regrid: class within Rose python library; represents
elements of the rose-app configuration used in the regrid-xy task
- rose_remap: class within Rose python library; represents
elements of the rose-app configuration used in the remap-pp-components task
- Return type:
rose_suite: metomi.rose.config.ConfigNode class
rose_regrid: metomi.rose.config.ConfigNode class
rose_remap: metomi.rose.config.ConfigNode class
- fre.pp.configure_script_yaml.set_rose_apps(yamlfile: dict, rose_regrid: metomi.rose.config.ConfigNode, rose_remap: metomi.rose.config.ConfigNode) None
Sets items in the regrid and remap rose app configurations.
- Parameters:
yamlfile (dict) – Model, settings, pp, and analysis yaml information combined into a dictionary
rose_regrid (metomi.rose.config.ConfigNode; class) – class within Rose python library; represents elements of rose-app configuration used in the regrid-xy task
rose_remap (metomi.rose.config.ConfigNode; class) – class within Rose python library; represents elements of rose-app configuration used in the remap-pp-components task
- Returns:
None
- Return type:
None
- fre.pp.configure_script_yaml.set_rose_suite(yamlfile: dict, rose_suite: metomi.rose.config.ConfigNode) None
Sets items in the rose suite configuration.
- Parameters:
yamlfile (dict) – Model, settings, pp, and analysis yaml information combined into a dictionary
rose_suite (metomi.rose.config.ConfigNode; class) – class within Rose python library; represents elements of the rose-suite configuration
- Returns:
None
- Return type:
None
- fre.pp.configure_script_yaml.validate_yaml(yamlfile: dict) None
Validate the format of the yaml file based on the schema.json in gfdl_msd_schemas
- Parameters:
yamlfile (dict) – Model, settings, pp, and analysis yaml information combined into a dictionary
- Raises:
ValueError –
if gfdl_mdf_schema path is not valid
combined yaml is not valid
unclear error in validation
- Returns:
None
- Return type:
None
- fre.pp.configure_script_yaml.yaml_info(yamlfile: str = None, experiment: str = None, platform: str = None, target: str = None) None
Using a valid pp.yaml, the rose-app and rose-suite configuration files are created in the cylc-src directory. The pp.yaml is also copied to the cylc-src directory.
- Parameters:
yamlfile (str) – Path to YAML file used for experiment configuration, default None
experiment (str) – One of the postprocessing experiment names from the yaml displayed by fre list exps -y $yamlfile (e.g. c96L65_am5f4b4r0_amip), default None
platform (str) – The location + compiler that was used to run the model (e.g. gfdl.ncrc5-deploy), default None
target (str) – Options used for the model compiler (e.g. prod-openmp), default None
- Raises:
ValueError – if experiment, platform, target or yamlfile is None
- Returns:
None
- Return type:
None
Note
In this function, outfile is defined and used with consolidate_yamls. This will create a final, combined yaml file in the ~/cylc-src/[workflow_id] directory. Additionally, rose-suite, regrid-xy rose-app, and remap rose-app information is being dumped into their own configuration files in the cylc-src directory.