e3sm_diags (Developer Reference)

Implementation

  • Python module: zppy/e3sm_diags.py

  • Jinja2 template: zppy/templates/e3sm_diags.bash

e3sm_diags.py is the most complex task module in zppy. It handles a wide variety of diagnostic sets, each with different parameter requirements.

Key functions in e3sm_diags.py:

  • check_parameter_defined(c, param): raises ParameterNotProvidedError if a required parameter is missing.

  • check_set_specific_parameter(c, sets, param): if any requested sets require this parameter, check it is present.

  • check_parameters_for_bash(c): validates parameters needed for the bash template. Runs early because it has few conditions.

  • check_mvm_only_parameters_for_bash(c): validates model-vs-model parameters.

  • check_and_define_parameters(c): resolves all parameters (inference + validation). Called later in the pipeline.

Adding a new diagnostic set

See Examples: Adding a new set to the E3SM Diagnostics task for a step-by-step guide.