lib.adf_config module

Config class for the Atmospheric Diagnostics Framework (ADF). This class inherits from the AdfBase class.

Currently this class does three things:

  1. Initializes an instance of AdfBase.

  2. Reads in a config (YAML) file.

  3. Expands any keywords into their relevant variable values.

class lib.adf_config.AdfConfig(config_file, debug=False)[source]

Bases: AdfBase

Config class, which reads in config (YAML) files and provides a mechanism to process and retreive relevant config variables.

expand_references(config_dict)[source]

Replace keyword (${var} or ${dict.var}) entries in the YAML (config) dictionary that reference other YAML dictionary variables/keys with the values of those variables.

Currently this function will always convert the referenced variable to a string.

read_config_var(varname, conf_dict=None, required=False)[source]

Checks if variable/list/dictionary exists in configure dictionary,and if so returns it.

Please note that in order to protect the values in the original YAML-defined config dictionary, only copies of the variable values are returned to the user.