-
Notifications
You must be signed in to change notification settings - Fork 344
CUPID LDF
Running LDF with CUPiD for an existing case
The Land Diagnostics Framework (LDF) was shamelessly built on top of work in CAM to construct the the Atmosphere Diagnostics Framework (ADF). The implementation and development of LDF is very much a work in progress and contributions to improve the workflow, usability, and capabilities are welcome.
The LDF:
- Creates single variable timeseries and monthly climatological means for a defined periods
- Calculates tables with global sums (or means) for requested variables from climatological means
- Plots mean annual timeseries for requested variables
- Plots annual and seasonal mean contour plots (from climatological means)
- Plots regional climatologies and time series for defined regions and quantities.
- A sample output from LDF is in this link.
NOTE: LDF compares two cases and currently has limited observations available in regional climatology plots. It works when comparing two structured (e.g. f09) or unstructured (ne30) cases. No regridding is required for comparisons of unstructured cases!
LDF is included as an external to CUPiD in CUPiD/externals/LDF
In this tutorial you will:
- Set up the CUPID configuration file
- Generate LDF configuration files
- Launch an interactive job
- Run LDF
- Run CUPID diagnostics and webpage
- View the LDF webpage
NOTE This tutorial assumes that you've already cloned CTSM with CUPID enabled and have the CUPID conda environments installed.
cd /glade/work/$USER/ctsm_cupid_2026/tools/CUPiD
cd examples/land_only
conda activate cupid-infrastructure
This example will create a subset of LDF output for quicker analyses DO THIS for the tutorial
ln -s config_subset.yml config.yml
Alternatively, for the full LDF output on a BGC case
ln -s config_full.yml config.yml
You can customize your post processing by modifying the cases or time period being analyzed, variables being plotted and more. This is not needed for the purposed of this tutorial, but it's helpful to see what's in your CUPID config file, so have a look
-
This step uses
CUPiD/helper_scripts/generate_ldf_config_file.pythat automatically pulls information from the CUPIDconfig.yml -
And points to an LDF template that we've provided (for plotting on structured or unstructured grids)
-
The output will be an ldf_config.yml that we can use to run LDF.
This example will run LDF on structured cases (e.g. f09 or 4x5 grid) DO THIS for the tutorial
../../helper_scripts/generate_ldf_config_file.py --cupid-config-loc . --ldf-template ../../externals/LDF/config_clm_structured_plots.yaml --out-file ldf_config.yml
This example will run LDF on unstructured cases (ne30 grid)
../../helper_scripts/generate_ldf_config_file.py --cupid-config-loc . --ldf-template ../../externals/LDF/config_clm_unstructured_plots.yaml --out-file ldf_config.yml
TODO point to the tutorial queue
export PBS_ACCOUNT=P93300041
qinteractive -l select=1:ncpus=16:mpiprocs=16:mem=100G -q casper@casper-pbs -l walltime=02:00:00 -A $PBS_ACCOUNT
- NOTE 1: If an LDF_output dir already exists in
CUPiD/examples/land_only, remove or rename it - NOTE 2: LDF will generate it's own single variable timeseries and climatology plots in your scratch directory.
- If you've already run LDF for a case with the same time periods as you're analyzing here it will reuse those files.
- If you're running over a different time period here, however, LDF will get confused by the old files so it's better to remove them.
module load conda
module load nco
conda activate cupid-analysis
../../externals/LDF/run_adf_diag ldf_config.yml
After LDF has finished you can build CUPID web pages
- First exit your interactive casper session
exit
- Then run cupid diagnostics and webpage
conda deactivate
conda activate cupid-infrastructure
cupid-diagnostics -lnd
- After diagnostics finish, run cupid webpage
cupid-webpage
Note: you can always remove a computed notebook & re-run cupid-diagnostics to get an updated version, e.g. if you run this before the LDF output exists and you want to rerun cupid daignostics and webpage with LDF and ILAMB together
You can also copy it to your local machine
- Open a terminal locally
- Move to your Desktop
- Set your username on derecho in the export command, below.
export USER=username
scp -r $USER@derecho.hpc.ucar.edu:/glade/work/$USER/ctsm_cupid_2026/tools/CUPiD/examples/land_only/computed_notebooks .
Next running ILAMB in CUPiD
Back to the Main LWMG-CUPiD Tutorial Page
-
General
-
Documents
-
Bugs/Issues
-
Tutorials
-
Development guides
CTSM Users:
CTSM Developer Team
-
Meetings
-
Notes