fre.yamltools.combine_yamls_script module
YAML Combination Utilities for FRE
This module provides utility functions for combining model, experiment, compile, platform, and analysis YAML files into unified configurations for the Flexible Runtime Environment (FRE) workflow. It offers routines to consolidate YAMLs for compilation and post-processing, supporting command-line tools and internal workflow automation.
There are only four functions currently, with consolidate_yamls acting as the center of this file’s control-flow. The other functions are called within consolidate_yamls, based on the use argument passed to it. use may be one of pp, and compile at this time, and determines which pieces of information are needed, where they come from, and where they are placed in the output dictionary.
For every possible use argument currently accepted by consolidate_yamls, there exists a corresponding info_parser class that houses the specific requirements of the combination and the implementation as well. For more information, consult the docstrings in those functions and modules, as well as those in this file.
Functions
get_combined_compileyaml(…)
get_combined_ppyaml(…)
consolidate_yamls(…)
- fre.yamltools.combine_yamls_script.consolidate_yamls(yamlfile: str, experiment: str, platform: str, target: str, use: str, output: str | None = None) dict
Depending on use argument passed, either create the final combined yaml for compilation or post-processing
- Parameters:
yamlfile (str) – Path to the model YAML configuration
experiment (str) – Post-processing experiment name
platform (str) – Platform name to be used
use (str) – How the tool is intended to be used (options: compile | pp)
output (str) – Output file name
- Raises:
ValueError – if ‘use’ value is not a valid entry (compile, pp)
- Returns:
yaml dictionary containing combined information from multiple yaml configurations
- Return type:
dict
- ..note:: The output file name should include a .yaml extension to indicate
it is a YAML configuration file
- fre.yamltools.combine_yamls_script.get_combined_cmoryaml(yamlfile: str | Path, experiment: str, platform: str, target: str, output: str | Path | None = None) Dict[str, Any]
PLACEHOLDER STUB