fre.cmor.cmor_yamler module

this module is for ‘fre cmor yaml’ calls, driving and steering the cmor_run_subtool via a model-yaml file holding configuration information on e.g. target experiments

fre.cmor.cmor_yamler.check_path_existence(some_path)

simple function checking for pathlib.Path existence, raising a FileNotFoundError if needed

fre.cmor.cmor_yamler.cmor_yaml_subtool(yamlfile=None, exp_name=None, platform=None, target=None, output=None, opt_var_name=None, run_one_mode=False)

A routine that cmorizes targets based on configuration stored in the model yaml. The model yaml points to various cmor-yaml configurations. The two levels of information are combined, their fields are parsed to de-reference anchors and call fre’s internal yaml constructor functions.

yamlfile (required): string or Path to a model-yaml exp_name (required): string representing an experiment name. it must be present in the list of

experiments within the targeted yamlfile

platform (required): string representing platform target (e.g. ncrc4.intel) target (required): string representing compilation target (e.g. prod-openmp) output (optional): string or Path representing target location for yamlfile output if desired opt_var_name (optional): string, specify a variable name to specifically process only filenames matching

that variable name. I.e., this string help target local_vars, not target_vars.

run_one_mode (optional): boolean, when True, will only process one of targeted files, then exit.

fre.cmor.cmor_yamler.conv_cmor_to_bronx_freq(cmor_table_freq)
fre.cmor.cmor_yamler.get_freq_from_table(json_table_config)

checks one of the variable fields within a cmip cmor table for the frequency of the data the table describes takes in a path to a json cmip cmor table file, and output a string corresponding to a FREbronx style frequency

fre.cmor.cmor_yamler.iso_to_bronx_chunk(cmor_chunk_in)

converts a string representing a datetime chunk in ISO’s convention (e.g. ‘P5Y’), to a string representing the same thing in FRE-bronx’s convention