Internal code documentation

Warning

The information in this section only pertains to the development and maintenance of the MDTF framework code. It’s not needed for end users to run the package, or for POD developers to develop new diagnostics.

Package code and API documentation

These sections provide an overview of specific parts of the code that’s more higher-level than the module docstrings.

Module index

Main framework modules

src.core

Definition of the MDTF framework main loop and classes implementing basic, supporting functionality.

src.environment_manager

Classes which setup software dependencies for the PODs and which execute the PODs' code.

src.output_manager

Implementation of the OutputManager plugin, which templates html and organizes the PODs' output files.

Supporting framework modules

src.cli

Classes which parse the framework's command line interface configuration files and implement the dynamic CLI; see Framework configuration and parsing.

src.cmip6

Code to parse CMIP6 controlled vocabularies and elements of the CMIP6 DRS.

src.data_model

Classes to describe "abstract" properties of model data: aspects that are independent of any model, experiment, or hosting protocol.

src.mdtf_info

Functions to collect settings metadata about installed PODs for the package and for online help.

src.units

Functions wrapping unit conversion methods from the third-party cfunits library.

src.verify_links

Checks html links in the output of the files returned by a run of the MDTF package and verifies that all linked files exist.

Utility modules

The src.util subpackage provides non-MDTF-specific utility functionality used many places in the modules above. See the util subpackage documentation for an overview.

src.util.basic

Classes and functions that define and operate on basic data structures.

src.util.dataclass

Extensions to Python dataclasses, for streamlined class definition.

src.util.datelabel

Classes for serializing and deserializing dates and times expressed as strings in filenames and paths.

src.util.exceptions

All framework-specific exceptions are placed in a single module to simplify imports.

src.util.filesystem

Utility functions for interacting with the local filesystem and configuration files.

src.util.logs

Utilities related to configuration and handling of framework logging.

src.util.processes

Utility functions for dealing with subprocesses.

Currently unused modules

The following modules implement features moved to, or intended for, future releases. They can be removed from the current production branch with no effect.

src.conflict_resolution

Currently unused; implements dependency resolution for plug-ins, intended as part of a future release.

src.install

Currently unused; intended as a standalone installer script for the package's conda environments and supporting data.