lib.adf_info
Information/Parameter (Info) class for the Atmospheric Diagnostics Framework (ADF).
This class inherits from the AdfConfig class. Currently this class does four things:
Initializes an instance of AdfConfig.
Checks for the three, required upper-level dictionaries specified in the config file, and makes copies where the variables have been expanded.
Extract values for “compare_obs”, “diag_var_list”, and “plot_location”, and provide properties to access these values to the rest of ADF.
Set “num_procs” variable, and provde num_procs property to the rest of ADF.
This class also provide methods for extracting variables from the standard, expanded config dictionaries.
Classes
Information/Parameter class, which initializes |
Module Contents
- class lib.adf_info.AdfInfo(config_file, debug=False)[source]
Bases:
lib.adf_config.AdfConfig
Information/Parameter class, which initializes an AdfConfig object and provides additional variables and methods to simplify access to the standard, expanded config dictionaries.
- __basic_info
- __cam_climo_info
- __cvdp_info
- __mdtf_info
- __user
- __diag_var_list
- __base_hist_str = ''
- __compare_obs
- __test_nicknames = []
- __base_nickname = 'Obs'
- __syear_baseline = ''
- __eyear_baseline = ''
- __plot_location = []
- __hist_str
- __syears = []
- __eyears = []
- hist_str_to_list(conf_var, conf_val)[source]
Make hist_str a nested list [ncases,nfiles] of the given value(s)
- property user
Return the “user” name if requested.
- property compare_obs
Return the “compare_obs” logical to the user if requested.
- property num_cases
Return the “num_cases” integer value to the user if requested.
- property diag_var_list
Return a copy of the “diag_var_list” list to the user if requested.
- property basic_info_dict
Return a copy of the “basic_info” list to the user if requested.
- property cam_climo_dict
Return a copy of the “cam_climo_dict” list to the user if requested.
- property baseline_climo_dict
Return a copy of the “cam_bl_climo_info” list to the user if requested.
- property num_procs
Return the “num_procs” logical to the user if requested.
- property plot_location
Return a copy of the ‘__plot_location’ string list to user if requested.
- property climo_yrs
Return the “syear” and “eyear” integer values to the user if requested.
- property case_nicknames
Return the test case and baseline nicknames to the user if requested.
- property hist_string
Return the CAM history string list to the user if requested.
- get_basic_info(var_str, required=False)[source]
Return the config variable from ‘diag_basic_info’ as requested by the user.
- get_cam_info(var_str, required=False)[source]
Return the config variable from ‘diag_cam_climo’ as requested by the user.
- get_baseline_info(var_str, required=False)[source]
Return the config variable from ‘diag_cam_baseline_climo’ as requested by the user. This function assumes that if the user is requesting it, then it must be required.
- get_cvdp_info(var_str, required=False)[source]
Return the config variable from ‘diag_cvdp_info’ as requested by the user. If ‘diag_cvdp_info’ is not found then try grabbing the variable from the top level of the YAML config file dictionary instead.