pcmdi_diags
Warning
pcmdi_diags is currently in a beta release and is undergoing active development.
Overview
The pcmdi_diags package provides multiple command-line entry points that
prepare inputs for PCMDI Metrics, launch diagnostics, reorganize outputs, and
assemble summary viewers.
This page focuses on how to run those commands and what each one produces. For the implementation details behind the shared setup and the command modules, see Developer Guide: pcmdi_diags.
The entry points defined by this repository are:
zi-pcmdi-link-observationzi-pcmdi-mean-climatezi-pcmdi-variability-modeszi-pcmdi-ensozi-pcmdi-synthetic-plots
zi-pcmdi-link-observation
Purpose
zi-pcmdi-link-observation prepares observational time-series files for
PCMDI workflows. It looks up observation aliases, creates symlinks into a
temporary observation directory, and can derive rstcre or rltcre when
their source variables exist.
Step-by-step
Parse the command-line arguments.
Resolve each requested variable to an observation alias using
reference_alias.json.Search the observation source tree for the matching NetCDF file.
Symlink the matching file into
obstmp_diror write a renamed copy when the observational variable must be mapped from a CMIP-style alias.Derive
rstcreandrltcreif those variables were requested and are not already present.
Parameter reference
Parameter |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
N/A |
Reference model name used to build linked observation file names. |
|
Yes |
N/A |
Reference table identifier paired with |
|
Yes |
N/A |
Comma-separated variables to link or derive. |
|
Yes |
N/A |
Observation set identifiers. When multiple sets are supplied and the
count matches |
|
Yes |
N/A |
Root directory containing the source observation time series. |
|
Yes |
N/A |
Output directory where symlinks or renamed files are written. |
|
No |
N/A |
Enables debug logging when set to |
zi-pcmdi-mean-climate
Purpose
zi-pcmdi-mean-climate prepares PCMDI mean-climate runs, executes the
underlying mean_climate_driver.py commands, and reorganizes the resulting
figures, metrics JSON files, and NetCDF diagnostics into the results_dir
layout expected by downstream viewers.
Step-by-step
Run the shared setup described above.
Save a
regions.jsonfile that maps each requested variable key to the requested region list.Generate one
mean_climate_driver.pycommand per requested variable that is present in the reference catalogue.Run those commands in parallel or serial mode.
Reorganize figures into grouped seasonal directories.
Reorganize JSON metrics and NetCDF diagnostics into
metrics_data.
Additional parameters
Parameter |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
N/A |
Comma-separated list of regions used both for command preparation and for organizing the collected outputs. |
zi-pcmdi-variability-modes
Purpose
zi-pcmdi-variability-modes prepares variability-mode diagnostics, launches
variability_modes_driver.py commands, and then collects graphics, metrics,
and diagnostic files into a structured output tree.
Step-by-step
Run the shared setup described above.
Read the observation metadata for the requested
varsvalue.Derive reference years and file paths from the observation catalogue.
Generate one
variability_modes_driver.pycommand per requested mode.Run those commands in parallel or serial mode.
Collect graphics into grouped seasonal directories.
Collect JSON metrics and NetCDF diagnostics into
metrics_data.
Additional parameters
Parameter |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
N/A |
Comma-separated list of variability modes to process. Specific modes
such as |
zi-pcmdi-enso
Warning
pcmdi_diags is currently in a beta release and is undergoing active development. zi-pcmdi-enso is not yet supported and should be treated as unavailable.
Purpose
zi-pcmdi-enso contains argument parsing, observation preparation helpers,
driver command generation, and output validation logic for ENSO diagnostics.
However, the current main() implementation exits immediately with an error
message stating that the command is not yet supported.
Current status
The CLI is present and documented here so callers can understand the intended interface, but the command should currently be treated as unavailable.
Additional parameters
Parameter |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
N/A |
Comma-separated ENSO metric group names intended for
|
zi-pcmdi-synthetic-plots
Purpose
zi-pcmdi-synthetic-plots generates summary metric plots and builds viewer
pages that combine mean-climate, variability, and ENSO outputs into a single
web presentation.
Step-by-step
Parse the command-line arguments into
SyntheticPlotsParameters.Build the expected input path under
www/put_model_here/pcmdi_diags.Read
synthetic_metrics_list.json.Generate the summary plots through
SyntheticMetricsPlotter.Assemble viewer configuration and supporting assets.
Write methodology, data, and viewer HTML pages under
web_dir/results_dir/viewer.
Parameter reference
Parameter |
Required |
Default |
Description |
|---|---|---|---|
|
Yes |
N/A |
Synthetic plot set selection accepted by the CLI entry point. |
|
Yes |
N/A |
Graphics format used for generated summary plots. |
|
Yes |
N/A |
Base web directory that contains |
|
Yes |
N/A |
Results subdirectory below both the input and output web locations. |
|
Yes |
N/A |
Case name shown in generated plots and viewer pages. |
|
Yes |
N/A |
Model name shown in generated plots and viewer pages. |
|
Yes |
N/A |
Table identifier shown in generated plots and viewer pages. |
|
Yes |
N/A |
Output web root where the viewer and summary products are written. |
|
Yes |
N/A |
Boolean controlling whether climatology summary products are included. |
|
Yes |
N/A |
Comma-separated climatology variables used in the viewer. |
|
Yes |
N/A |
Year range label for climatology products. |
|
Yes |
N/A |
Comma-separated climatology region list used in the viewer. |
|
Yes |
N/A |
Directory containing CMIP climatology comparison data. |
|
Yes |
N/A |
Name of the CMIP climatology set used by the viewer. |
|
Yes |
N/A |
Boolean controlling whether atmospheric variability summaries are included. |
|
Yes |
N/A |
Comma-separated atmospheric variability modes used in summary products. |
|
Yes |
N/A |
Comma-separated atmospheric variability variables accepted by the CLI. |
|
Yes |
N/A |
Year range label for atmospheric variability products. |
|
Yes |
N/A |
Boolean controlling whether coupled variability summaries are included. |
|
Yes |
N/A |
Comma-separated coupled variability modes used in summary products. |
|
Yes |
N/A |
Comma-separated coupled variability variables accepted by the CLI. |
|
Yes |
N/A |
Year range label for coupled variability products. |
|
Yes |
N/A |
Directory containing CMIP variability comparison data. |
|
Yes |
N/A |
Name of the CMIP variability set used by the viewer. |
|
Yes |
N/A |
Boolean controlling whether ENSO summaries are included. |
|
Yes |
N/A |
Comma-separated ENSO variables accepted by the CLI. |
|
Yes |
N/A |
Year range label for ENSO products. |
|
Yes |
N/A |
Directory containing CMIP ENSO comparison data. |
|
Yes |
N/A |
Name of the CMIP ENSO set used by the viewer. |
|
Yes |
N/A |
Title shown on generated viewer pages. |
|
Yes |
N/A |
Version label shown on generated viewer pages. |
|
Yes |
N/A |
Run-type label converted to a subtitle in the viewer. |
|
Yes |
N/A |
Base directory used to find shared PCMDI web assets and data. |
|
Yes |
N/A |
Template directory below |
|
Yes |
N/A |
Boolean controlling whether the plotter saves all underlying data. |
|
No |
N/A |
Enables debug logging when set to |