lib.adf_info module
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.
- class lib.adf_info.AdfInfo(config_file, debug=False)[source]
Bases:
AdfConfig
Information/Parameter class, which initializes an AdfConfig object and provides additional variables and methods to simplify access to the standard, expanded config dictionaries.
- property baseline_climo_dict
Return a copy of the “cam_bl_climo_info” 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 case_nicknames
Return the test case and baseline nicknames to the user if requested.
- property climo_yrs
Return the “syear” and “eyear” integer values to the user if requested.
- property compare_obs
Return the “compare_obs” logical to the user if requested.
- property diag_var_list
Return a copy of the “diag_var_list” list to the user if requested.
- 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_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_climo_yrs_from_ts(input_ts_loc, case_name)[source]
Grab start and end climo years if none are specified in config file for pre-made time series file(s)
- Returns:
start year
end year
- 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.
- get_mdtf_info(var_str, required=False)[source]
Return the config variable from ‘diag_mdtf_info’ as requested by the user. If ‘diag_mdtf_info’ is not found then try grabbing the variable from the top level of the YAML config file dictionary instead.
- hist_str_to_list(conf_var, conf_val)[source]
Make hist_str a nested list [ncases,nfiles] of the given value(s)
- property hist_string
Return the CAM history string list to the user if requested.
- property num_cases
Return the “num_cases” integer value 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 user
Return the “user” name if requested.