SimOutput

The SimOutput module provides utilities for output operations including diagnostics and performance analysis.

Diagnostics Setup

The diagnostics setup function configures default diagnostics for AMIP simulations, which uses ClimaDiagnostics.jl to save variables throughout the course of a simulation.

For more information about diagnostics in ClimaCoupler, including how to customize which variables to save, how often, and with which reductions, see the Diagnostics documentation.

Functions

ClimaCoupler.SimOutput.diagnostics_setupFunction
diagnostics_setup(fields, output_dir, start_date, t_start, diagnostics_dt)

Set up the default diagnostics for an AMIP simulation, using ClimaDiagnostics. The diagnostics are saved to NetCDF files. Currently, this just includes a diagnostic for turbulent energy fluxes.

Return a DiagnosticsHandler object to coordinate the diagnostics.

source

Benchmarking Analysis

The benchmark analysis functions help compare performance metrics (e.g. SYPD, or simulated years per day) between different simulation runs. This information is formatted into a table format using PrettyTables.jl, and is sent to Slack automatically each time the "benchmarks" buildkite pipeline is run.

Functions

ClimaCoupler.SimOutput.get_run_infoFunction
get_run_info(parsed_args, run_type)

Use the input parsed_args to get the job ID and artifacts directories for the GPU run of the given run_type.

run_type must be one of "coupled", "coupledio", "atmos", "atmosdiagedmf", "coupledprogedmfcoarse", or "coupledprogedmffine".

source

Simulation and Observation Data

These functions provide dictionaries mapping diagnostic variable names to preprocessed simulation and observational data for use in leaderboard comparisons. They are used by compute_leaderboard to load and prepare variables for comparison against observations.

For more information about adding variables to the leaderboard, see the Leaderboard documentation.

Functions

ClimaCoupler.SimOutput.get_sim_var_dictFunction
get_sim_var_dict(diagnostics_folder_path)

Return a dictionary mapping short names to OutputVar containing preprocessed simulation data. This is used by the function compute_leaderboard.

To add a variable for the leaderboard, add a key-value pair to the dictionary sim_var_dict whose key is the short name of the variable and the value is an anonymous function that returns a OutputVar. For each variable, any preprocessing should be done in the corresponding anonymous function which includes unit conversion and shifting the dates.

The variable should have only three dimensions: latitude, longitude, and time.

source
ClimaCoupler.SimOutput.get_obs_var_dictFunction
get_obs_var_dict()

Return a dictionary mapping short names to OutputVar containing preprocessed observational data. This is used by the function compute_leaderboard.

To add a variable for the leaderboard, add a key-value pair to the dictionary obs_var_dict whose key is the short name of the variable and the value is an anonymous function that returns a OutputVar. The function must take in a start date which is used to align the times in the observational data to match the simulation data. The short name must be the same as in sim_var_dict in the function sim_var_dict. For each variable, any preprocessing is done in the corresponding anonymous function which includes unit conversion and shifting the dates.

The variable should have only three dimensions: latitude, longitude, and time.

source