fre.yamltools.cmor_info_parser module

defines how a cmor yaml will be parsed

class fre.yamltools.cmor_info_parser.CMORYaml(yamlfile, experiment, platform, target)

Bases: object

class holding routines for initalizing cmor yamls

clean_yaml(yml_dict)

Clean the yaml; remove unnecessary sections in final combined yaml.

combine_experiment(yaml_content, loaded_yaml)

Combine experiment yamls with the defined combined.yaml. If more than 1 pp yaml defined, return a list of paths.

combine_model()

Create the combined.yaml and merge it with the model yaml

merge_cmor_yaml(cmor_list, loaded_yaml)
fre.yamltools.cmor_info_parser.experiment_check(mainyaml_dir, experiment, loaded_yaml)

Check that the experiment given is an experiment listed in the model yaml. Extract experiment specific information and file paths. Arguments: mainyaml_dir (required) : model yaml file directory experiment (required) : string representing an experiment name loaded_yaml (required) : yaml data object