Parameters
Parameters make use of inheritance. Parameters set in [default] can
be overridden by parameters set in a [section], which can themselves
be overridden by parameters set in a [[subsection].
Warning
Note that some parameters will be overriden by defaults if you define them too high up in the inheritance hierarchy.
See this release’s parameter defaults on GitHub for a complete list of parameters and their default values. You can also view the most up-to-date, unreleased parameter defaults.
Deprecated parameters
- The following parameters no longer perform any function:
"e3sm_to_cmip_environment_commands" "ts_fmt" "scratch" "atmosphere_only" "plot_names"
Parameter checking & inferring – for users
There are two types of inferences, each with their own parameter in default.ini:
infer_path_parameters: infer paths that are not explicitly provided in the configuraiton file. Default isTrue.infer_section_parameters: infer subtask dependency names that are not explicitly provided in the configuration file. Default isTrue.
Section inferences
For the climo, ts, e3sm_to_cmip, and e3sm_diags tasks:
If
subsection(the name of the subtask) is undefined, just use the value ofgrid.
For the e3sm_to_cmip task:
If
ts_subsection(the name of thetssubtask that thise3sm_to_cmipsubtask is dependent on) is undefined, assume it had the same name as thise3sm_to_cmipsubtask.
For the ilamb task:
If
ts_land_subsection(the name of thetsland-specific subtask that thisilambtask is dependent on), assume it island_monthly.If
e3sm_to_cmip_land_subsection(the name of thee3sm_to_cmipland-specific subtask that thisilambtask is dependent on), again assume it island_monthly.If we are not doing a
land_onlyrun andts_atm_subsection(the name of thetsatm-specific subtask that thisilambtask is dependent on), assume it isatm_monthly_180x360_aave.If we are not doing a
land_onlyrun ande3sm_to_cmip_atm_subsection(the name of thee3sm_to_cmipatm-specific subtask that thisilambtask is dependent on), again assume it isatm_monthly_180x360_aave.
Path inferences
For the e3sm_diags task:
If
reference_data_path(the path to the reference data) is undefined, assume it is thediagnostics_base_pathfrom Mache plus/observations/Atm/climatology/. (So, it is important to change this for model-vs-model runs).
For the mpas_analysis task:
reference_data_pathandtest_data_pathare optional and are only used for model-vs-model comparisons. If provided,zppyuses them to locate the MPAS-Analysis config files from a previous MPAS-Analysis run and passes those through to MPAS-Analysis ascontrolRunConfigFile(reference) andmainRunConfigFile(test).Note
These parameter names are intentionally consistent with the terminology used by
e3sm_diagsfor model-vs-model runs: in both cases,reference_data_pathidentifies the reference simulation’s zppy-generated outputs.The practical difference is what each downstream tool consumes:
e3sm_diagsneedsreference_data_pathto be the specific directory containing the reference climatology files (typically under the reference run’spost/.../climtree), whereasmpas_analysisneeds to find the reference MPAS-Analysis config file. For MPAS-Analysis,zppyresolves the config file whenreference_data_pathpoints to the prior run’s zppy output directory (the one containingpost/).reference_data_pathis intended to point to the prior run’s zppy output directory (the one containingpost/).zppywill then use:<reference_data_path>/post/analysis/mpas_analysis/cfg/mpas_analysis_<identifier>.cfg(ormpas_analysis_mvmif the referenced run was MVM).When
reference_data_pathis set to a non-subsection path,reference_caseis required so the MVM output directory can include the reference case name. Ifreference_data_pathis set to[[subsection]],reference_caseis inferred to be the same as the currentcase.
MPAS-Analysis model-vs-model year ranges
MPAS-Analysis comparisons are configured by year ranges, similar to other zppy tasks.
For model-vs-model comparisons, zppy supports separate year ranges for the test and reference runs:
ts_years,climo_years,enso_yearsdefine the test run year ranges.If
test_data_pathreferences a prior[mpas_analysis]subsection using[[subsection]], and these values are not provided, zppy uses that subsection’s year ranges instead.
ref_ts_years,ref_climo_years,ref_enso_yearsoptionally override the reference run year ranges.
If a ref_*_years parameter is not provided, it defaults to the corresponding test year ranges.
If reference_data_path references a prior [mpas_analysis] subsection using [[subsection]],
the defaults come from that subsection’s year ranges instead.
If a ref_*_years parameter contains a single range and multiple test ranges are requested, the single reference range is used for each test range.
For the ilamb task:
If
ilamb_obs(the path to observation data forilamb) is undefined, assume it is thediagnostics_base_pathfrom Mache plus/ilamb_data.
Required parameters, by e3sm_diags set
See Confluence for tables of which sets require which parameters.
Parameter checking & inferring – for developers
There are many parameter-handling functions.
In utils.py:
get_value_from_parameter: check if parameter is in the configuration dictionary. If not, if inference is turned on (the default), then just use the value ofsecond_choice_parameter. If inferenceis turned off, raise aParameterNotProvidedError. Use this function if the backup optionset_value_of_parameter_if_undefined: check if parameter is in the configuration dictionary. If not, if inferenceis turned on (the default), then just set the parameter’s value to thebackup_option. If inferenceis turned off, raise aParameterNotProvidedError.
In e3sm_diags.py:
check_parameter_defined: check if parameter is in the configuration dictionary, and if not raise aParameterNotProvidedError.check_set_specific_parameter: if any requestede3sm_diagssets require this parameter, make sure it is present. If not, raise aParameterNotProvidedError.check_parameters_for_bash: usecheck_set_specific_parameterto check the existence of parameters that aren’t used until the bash script.check_mvm_only_parameters_for_bash: similar, but these are specifically parameters used for model-vs-model runs. Usescheck_parameter_definedin addition tocheck_set_specific_parameter.check_and_define_parameters: make sure all parameters are defined, usingutils.py get_value_from_parameter,utils.py set_value_of_parameter_if_undefined, andcheck_mvm_only_parameters_for_bash.
check_parameters_for_bash can be run immediately for each subtask because it has very few conditions. Other checks are included in check_and_define_parameters later on in the code.