lib.adf_info ============ .. py:module:: lib.adf_info .. autoapi-nested-parse:: Information/Parameter (Info) class for the Atmospheric Diagnostics Framework (ADF). This class inherits from the AdfConfig class. Currently this class does four things: 1. Initializes an instance of AdfConfig. 2. Checks for the three, required upper-level dictionaries specified in the config file, and makes copies where the variables have been expanded. 3. Extract values for "compare_obs", "diag_var_list", and "plot_location", and provide properties to access these values to the rest of ADF. 4. 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 ------- .. autoapisummary:: lib.adf_info.AdfInfo Module Contents --------------- .. py:class:: AdfInfo(config_file, debug=False) Bases: :py:obj:`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. .. py:attribute:: __basic_info .. py:attribute:: __cam_climo_info .. py:attribute:: __cvdp_info .. py:attribute:: __mdtf_info .. py:attribute:: __user .. py:attribute:: __diag_var_list .. py:attribute:: __base_hist_str :value: '' .. py:attribute:: __compare_obs .. py:attribute:: __test_nicknames :value: [] .. py:attribute:: __base_nickname :value: 'Obs' .. py:attribute:: __syear_baseline :value: '' .. py:attribute:: __eyear_baseline :value: '' .. py:attribute:: __plot_location :value: [] .. py:attribute:: __hist_str .. py:attribute:: __syears :value: [] .. py:attribute:: __eyears :value: [] .. py:method:: hist_str_to_list(conf_var, conf_val) Make hist_str a nested list [ncases,nfiles] of the given value(s) .. py:property:: user Return the "user" name if requested. .. py:property:: compare_obs Return the "compare_obs" logical to the user if requested. .. py:property:: num_cases Return the "num_cases" integer value to the user if requested. .. py:property:: diag_var_list Return a copy of the "diag_var_list" list to the user if requested. .. py:property:: basic_info_dict Return a copy of the "basic_info" list to the user if requested. .. py:property:: cam_climo_dict Return a copy of the "cam_climo_dict" list to the user if requested. .. py:property:: baseline_climo_dict Return a copy of the "cam_bl_climo_info" list to the user if requested. .. py:property:: num_procs Return the "num_procs" logical to the user if requested. .. py:property:: plot_location Return a copy of the '__plot_location' string list to user if requested. .. py:property:: climo_yrs Return the "syear" and "eyear" integer values to the user if requested. .. py:property:: case_nicknames Return the test case and baseline nicknames to the user if requested. .. py:property:: hist_string Return the CAM history string list to the user if requested. .. py:method:: get_basic_info(var_str, required=False) Return the config variable from 'diag_basic_info' as requested by the user. .. py:method:: get_cam_info(var_str, required=False) Return the config variable from 'diag_cam_climo' as requested by the user. .. py:method:: get_baseline_info(var_str, required=False) 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. .. py:method:: add_diag_var(var_str) Adds a new variable to the ADF variable list .. py:method:: get_cvdp_info(var_str, required=False) 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. .. py:method:: get_mdtf_info(var_str, required=False) 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. .. py:method:: get_climo_yrs_from_ts(input_ts_loc, case_name) 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