From 499c13f783ccbfb01d2efb3c7b252a9c67868cce Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 8 Jan 2026 14:57:07 -0700 Subject: [PATCH 01/47] Add CUPiD to the submodule checkout --- .gitmodules | 9 +++++++++ tools/cupid | 1 + 2 files changed, 10 insertions(+) create mode 160000 tools/cupid diff --git a/.gitmodules b/.gitmodules index b1d805571f..b128694077 100644 --- a/.gitmodules +++ b/.gitmodules @@ -121,6 +121,15 @@ fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial +[submodule "cupid"] +# CUPiD does model post-processing + path = tools/cupid + url = https://github.com/NCAR/CUPiD.git +fxtag = v0.4.0 +fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed +fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git + [submodule "doc-builder"] path = doc/doc-builder url = https://github.com/ESMCI/doc-builder diff --git a/tools/cupid b/tools/cupid new file mode 160000 index 0000000000..7ce65b295a --- /dev/null +++ b/tools/cupid @@ -0,0 +1 @@ +Subproject commit 7ce65b295acd7b8b9baed0633a124c1e2fa9f224 From a0f409455b0b7503840bcdc7cb9b21a1f8d58060 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 8 Jan 2026 16:20:20 -0700 Subject: [PATCH 02/47] CIME assumes a certain case for CUPiD --- .gitmodules | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index b128694077..e3758a1d3e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -123,9 +123,11 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial [submodule "cupid"] # CUPiD does model post-processing - path = tools/cupid - url = https://github.com/NCAR/CUPiD.git -fxtag = v0.4.0 +path = tools/CUPiD +url = https://github.com/NCAR/CUPiD.git +#fxtag = v0.4.0 +# Use the hash that enables building the cupid-analysis environment +fxtag = 7ce65b295acd7b8b9baed0633a124c1e2fa9f224 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git From 22bcd8cc60110f8059344d4d6830152bbee2ad9a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 8 Jan 2026 16:33:37 -0700 Subject: [PATCH 03/47] Add note about the addition of CUPiD under tools --- tools/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/README.md b/tools/README.md index 3e74fd6f3e..059e546fbb 100644 --- a/tools/README.md +++ b/tools/README.md @@ -7,6 +7,7 @@ modification of CTSM input files. I. General directory structure: `$CTSMROOT/tools` + CUPiD ------------ Postprocessing of cases (CESM Unified Postprocessing and Diagnostics) mksurfdata_esmf -- Create surface datasets. crop_calendars --- Regrid and process GGCMI sowing and harvest date files for use in CTSM. From 133475dc0993a281f5d46415e09b9f414c72af0b Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 9 Jan 2026 10:26:05 -0700 Subject: [PATCH 04/47] Change name of the CUPiD directory so that it uses the name assumed in cime, and add a usermod for CUPiD --- .gitmodules | 4 ++-- cime_config/usermods_dirs/clm/CUPiD/README | 2 ++ .../usermods_dirs/clm/CUPiD/shell_commands | 22 +++++++++++++++++++ tools/{cupid => CUPiD} | 0 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 cime_config/usermods_dirs/clm/CUPiD/README create mode 100755 cime_config/usermods_dirs/clm/CUPiD/shell_commands rename tools/{cupid => CUPiD} (100%) diff --git a/.gitmodules b/.gitmodules index e3758a1d3e..0d9cee9870 100644 --- a/.gitmodules +++ b/.gitmodules @@ -123,8 +123,8 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial [submodule "cupid"] # CUPiD does model post-processing -path = tools/CUPiD -url = https://github.com/NCAR/CUPiD.git + path = tools/CUPiD + url = https://github.com/NCAR/CUPiD.git #fxtag = v0.4.0 # Use the hash that enables building the cupid-analysis environment fxtag = 7ce65b295acd7b8b9baed0633a124c1e2fa9f224 diff --git a/cime_config/usermods_dirs/clm/CUPiD/README b/cime_config/usermods_dirs/clm/CUPiD/README new file mode 100644 index 0000000000..aa2d4e5de1 --- /dev/null +++ b/cime_config/usermods_dirs/clm/CUPiD/README @@ -0,0 +1,2 @@ +This usermod turns on running CUPiD to get plots and diagnostics as part of a case. It sets the most common settings +for a CTSM case. diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands new file mode 100755 index 0000000000..6982b8e836 --- /dev/null +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -0,0 +1,22 @@ +#!/bin/bash +./xmlchange RUN_POSTPROCESSING=TRUE +LND_ROOT=`./xmlquery --value COMP_ROOT_DIR_LND` +CUPID_ROOT="$LND_ROOT/tools/CUPiD" +$CUPID_ROOT/helper_scripts/generate_ldf_config_file.py --cupid-config-loc $CUPID_ROOT/examples/key_metrics \ +--ldf-template $CUPID_ROOT/externals/LDF/config_clm_unstructured_plots.yaml --out-file ldf_config.yml + +./xmlchange --force CUPID_BASELINE_CASE='$CASE' +./xmlchange --force CUPID_BASE_STARTDATE='$RUN_STARTDATE' +./xmlchange --force CUPID_BASE_STOP_N='$STOP_N' +./xmlchange --force CUPID_BASE_STOP_OPTION='$STOP_OPTION' +./xmlchange CUPID_RUN_TYPE=SP +./xmlchange --force CUPID_STARTDATE='$RUN_STARTDATE' +./xmlchange --force CUPID_STOP_N='$STOP_N' +./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' +./xmlchange CUPID_GEN_HTML=FALSE +./xmlchange --force CUPID_NTASKS=256 +./xmlchange CUPID_RUN_ADF=FALSE +./xmlchange CUPID_RUN_ALL=FALSE +./xmlchange CUPID_RUN_LDF=TRUE +./xmlchange CUPID_RUN_LND=TRUE +./xmlchange CUPID_RUN_ROF=TRUE diff --git a/tools/cupid b/tools/CUPiD similarity index 100% rename from tools/cupid rename to tools/CUPiD From 99ecd8ed2dff79834dec0e1d7d263d9d81f52b17 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 00:02:57 -0700 Subject: [PATCH 05/47] Update README.DIAG to use the CUPiD usermod directory --- README.DIAG.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README.DIAG.md diff --git a/README.DIAG.md b/README.DIAG.md new file mode 100644 index 0000000000..5ef34decda --- /dev/null +++ b/README.DIAG.md @@ -0,0 +1,44 @@ +# QuickStart to Running Diagnostics of your Case with CUPiD (CESM Unified Postprocessing and Diagnostics) + +[!NOTE] +Land Diagnostics Cheat Sheet is here: + +This document has more details on more options and such + +https://docs.google.com/document/d/1ziZWGgaj9FxgR6WRHyCAZnzIc6-4ezqfUDDpQv4MzUI/edit?tab=t.0 + +## Initial setup steps to do first time + +This step is something you need to do the first time you want to run CUPiD for a case. +And you only need to do it again if the CUPiD environment changes. + +``` shell +# Setup the conda environments +# TODO: Make this use py_env_create? +mamba env create --yes -f tools/cupid/environments/cupid-infrastructure.yml +mamba env create --yes -f tools/cupid/environments/cupid-analysis.yml +# Check that the environment is valid +conda activate cupid-infrastructure +which cupid-diagnostics +# Should return something like: +# $HOME/conda-envs/cupid-infrastructure/bin/cupid-diagnostics +# If it returns "Command not found." something is wrong with the environment +``` + +## Create your case using the CUPiD user-mod + +This is similar to setting up any case, such as documented in the README and Quickstart guides. + +``` shell +./create_newcase --case testIwCUPiD --res f09_t232 --compset I2000Clm60BgcCrop --user-mods-dirs clm-CUPiD +``` + +## Run CUPID in your case + +After st_archive has run do the following. With RUN_POSTPROCESSING set to TRUE this will happen +with each case submission automatically. But, if you want to run it separately... + + +``` shell +./case.submit --only-job case.cupid +``` \ No newline at end of file From 94934420cd3691c67a3645fb295df7502571435f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 00:04:01 -0700 Subject: [PATCH 06/47] Rename for clarity --- README.DIAG.md => README.DIAGNOSTICS | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.DIAG.md => README.DIAGNOSTICS (100%) diff --git a/README.DIAG.md b/README.DIAGNOSTICS similarity index 100% rename from README.DIAG.md rename to README.DIAGNOSTICS From 3d368b616e0f2555bbffd41b80bc9a596e081d53 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 00:05:17 -0700 Subject: [PATCH 07/47] Add note about new README --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index deca3cd8d2..964c228185 100644 --- a/README +++ b/README @@ -80,6 +80,7 @@ README ------------------- This file README.md ---------------- File that displays on github under https::/github.com/ESCOMP/CTSM.git README.rst --------------- File that displays under the project in github README_GITFLEXIMOD.rst --- Information on how to work with git-fleximod for CTSM +README_DIAGNOSTICS.md ---- Quickstart on using CUPiD to plot diagnostics for your CTSM case WhatsNewInCTSM5.4.md ----- Overview document of the changes between ctsm5.3 and ctsm5.4 Copyright ---------------- CESM Copyright file doc/UpdateChangeLog.pl --- Script to add documentation on a tag to the From b21026d4c94b1355de8f9dc5b7aaad32fe1bfb87 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 00:10:45 -0700 Subject: [PATCH 08/47] Update CUPiD version to include pinned environments --- .gitmodules | 8 +++----- tools/CUPiD | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0d9cee9870..4d054d9007 100644 --- a/.gitmodules +++ b/.gitmodules @@ -123,11 +123,9 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial [submodule "cupid"] # CUPiD does model post-processing - path = tools/CUPiD - url = https://github.com/NCAR/CUPiD.git -#fxtag = v0.4.0 -# Use the hash that enables building the cupid-analysis environment -fxtag = 7ce65b295acd7b8b9baed0633a124c1e2fa9f224 +path = tools/CUPiD +url = https://github.com/NCAR/CUPiD.git +fxtag = v0.4.1 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 7ce65b295a..ab25df5986 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 7ce65b295acd7b8b9baed0633a124c1e2fa9f224 +Subproject commit ab25df598687e289992c21a8bc73a940cb6f8828 From 0ef3c927a64d0682cd845a71bb07a6c17dd1f8a9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 10:40:30 -0700 Subject: [PATCH 09/47] Fix the generate issue for CUPiD --- .gitmodules | 7 +++++-- tools/CUPiD | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4d054d9007..08e97c7fef 100644 --- a/.gitmodules +++ b/.gitmodules @@ -124,8 +124,11 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial [submodule "cupid"] # CUPiD does model post-processing path = tools/CUPiD -url = https://github.com/NCAR/CUPiD.git -fxtag = v0.4.1 +#url = https://github.com/NCAR/CUPiD.git +url = https://github.com/TeaganKing/CUPiD.git +#fxtag = v0.4.1 +#fxtag = lnd_gen_config +fxtag = 50c3157079bba234b90a6783b6528c670a3f4e58 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index ab25df5986..50c3157079 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit ab25df598687e289992c21a8bc73a940cb6f8828 +Subproject commit 50c3157079bba234b90a6783b6528c670a3f4e58 From 675ce371bcef38a5d24e4d91f1f4f07c2271d708 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 10:44:55 -0700 Subject: [PATCH 10/47] Adjust options a bit, and also change the generate step so it only happens if env_postprocessing.xml hasn't been setup yet --- .../usermods_dirs/clm/CUPiD/shell_commands | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index 6982b8e836..7729eb1335 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -1,20 +1,38 @@ #!/bin/bash +# Make sure DOUT_S is turned on, as CUPiD only runs after st_archive +./xmlchange DOUT_S=TRUE + +# Enable postprocessing which is what turns on running CUPiD for a case ./xmlchange RUN_POSTPROCESSING=TRUE + + LND_ROOT=`./xmlquery --value COMP_ROOT_DIR_LND` -CUPID_ROOT="$LND_ROOT/tools/CUPiD" -$CUPID_ROOT/helper_scripts/generate_ldf_config_file.py --cupid-config-loc $CUPID_ROOT/examples/key_metrics \ ---ldf-template $CUPID_ROOT/externals/LDF/config_clm_unstructured_plots.yaml --out-file ldf_config.yml +CUPID_ROOT=`./xmlquery --value CUPID_ROOT` +# IF CUPID_ROOT is not set, it means case.setup hasn't run yet so run the generate script to get it configured +# This will result in env_postprocess.xml to be created in the case which is then edited below +if [ -z "$CUPID_ROOT" ]; then + CUPID_ROOT="$LND_ROOT/tools/CUPiD" + $CUPID_ROOT/helper_scripts/generate_cupid_config_for_cesm_case.py --cesm-root $SRCROOT --case-root . +fi + +# +# Set CUPiD parameters for what a CTSM case needs to do +# + +# Set the standard CUPiD baseline case to compare to ./xmlchange --force CUPID_BASELINE_CASE='$CASE' ./xmlchange --force CUPID_BASE_STARTDATE='$RUN_STARTDATE' ./xmlchange --force CUPID_BASE_STOP_N='$STOP_N' +# TODO: Make sure STOP_OPTION is nyears ./xmlchange --force CUPID_BASE_STOP_OPTION='$STOP_OPTION' +# TODO: Have this set based on what CLM_BLDNML_OPTS has ./xmlchange CUPID_RUN_TYPE=SP ./xmlchange --force CUPID_STARTDATE='$RUN_STARTDATE' ./xmlchange --force CUPID_STOP_N='$STOP_N' ./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' ./xmlchange CUPID_GEN_HTML=FALSE -./xmlchange --force CUPID_NTASKS=256 +./xmlchange CUPID_NTASKS=1 ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE ./xmlchange CUPID_RUN_LDF=TRUE From e870c108f6d3d51dffa18c5afac13a0507430894 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 13 Jan 2026 10:53:04 -0700 Subject: [PATCH 11/47] Add a simple test to run CUPiD --- cime_config/testdefs/testlist_clm.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index c651295d0e..9a4ee06f07 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -100,6 +100,15 @@ + + + + + + + + + From 5630cbdc06142c18c1c694d66337b5dd5637a096 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 14 Jan 2026 21:39:49 -0700 Subject: [PATCH 12/47] Add another one time thing to do --- README.DIAGNOSTICS | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.DIAGNOSTICS b/README.DIAGNOSTICS index 5ef34decda..df2cf77d75 100644 --- a/README.DIAGNOSTICS +++ b/README.DIAGNOSTICS @@ -23,6 +23,13 @@ which cupid-diagnostics # Should return something like: # $HOME/conda-envs/cupid-infrastructure/bin/cupid-diagnostics # If it returns "Command not found." something is wrong with the environment + + +# Now make sure the conda environments can be used by Jupyter notebooks +conda activate cupid-analysis +python -m ipykernel install --user --name=cupid-analysis +conda activate cupid-infrastructure +python -m ipykernel install --user --name=cupid-infrastructure ``` ## Create your case using the CUPiD user-mod @@ -41,4 +48,4 @@ with each case submission automatically. But, if you want to run it separately.. ``` shell ./case.submit --only-job case.cupid -``` \ No newline at end of file +``` From e463fe79308a31a20495891432fe25a92f895415 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 14 Jan 2026 21:42:47 -0700 Subject: [PATCH 13/47] Update to a version that is working --- .gitmodules | 6 +++--- tools/CUPiD | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 08e97c7fef..87618ac243 100644 --- a/.gitmodules +++ b/.gitmodules @@ -126,9 +126,9 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial path = tools/CUPiD #url = https://github.com/NCAR/CUPiD.git url = https://github.com/TeaganKing/CUPiD.git -#fxtag = v0.4.1 -#fxtag = lnd_gen_config -fxtag = 50c3157079bba234b90a6783b6528c670a3f4e58 +#fxtag = v0.5.0 +#fxtag = cesm-workflow-fixes +fxtag = 78147810891530c6ed3a89e1d197cfca7586974b fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 50c3157079..7814781089 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 50c3157079bba234b90a6783b6528c670a3f4e58 +Subproject commit 78147810891530c6ed3a89e1d197cfca7586974b From baa6088967cb9bd5965f29fe682eab07cccd5f69 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 14 Jan 2026 22:01:49 -0700 Subject: [PATCH 14/47] Turn off some options that weren't working, and add setting DOUT_S to env_test.xml for a TEST case --- .../usermods_dirs/clm/CUPiD/shell_commands | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index 7729eb1335..cb86d88680 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -11,11 +11,19 @@ LND_ROOT=`./xmlquery --value COMP_ROOT_DIR_LND` CUPID_ROOT=`./xmlquery --value CUPID_ROOT` # IF CUPID_ROOT is not set, it means case.setup hasn't run yet so run the generate script to get it configured # This will result in env_postprocess.xml to be created in the case which is then edited below +# TODO: Make sure this is really needed! if [ -z "$CUPID_ROOT" ]; then CUPID_ROOT="$LND_ROOT/tools/CUPiD" $CUPID_ROOT/helper_scripts/generate_cupid_config_for_cesm_case.py --cesm-root $SRCROOT --case-root . fi +# For a test case, make sure DOUT_S is TRUE +# TODO: Add a proper SystemTest so this is handled correctly in the test +TEST=`./xmlquery --value TEST` +if [ "$TEST" == "TRUE" ]; then + ./xmlchange DOUT_S=TRUE --file env_test.xml +fi + # # Set CUPiD parameters for what a CTSM case needs to do # @@ -31,10 +39,14 @@ fi ./xmlchange --force CUPID_STARTDATE='$RUN_STARTDATE' ./xmlchange --force CUPID_STOP_N='$STOP_N' ./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' +# TODO: This should maybe be turned on as a smoke test, and to check for the appropriate files in testing ./xmlchange CUPID_GEN_HTML=FALSE +# TODO: Test with running more tasks ./xmlchange CUPID_NTASKS=1 ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE -./xmlchange CUPID_RUN_LDF=TRUE +# TODO: Get CUPiD working with LDF under CESM +./xmlchange CUPID_RUN_LDF=FALSE ./xmlchange CUPID_RUN_LND=TRUE -./xmlchange CUPID_RUN_ROF=TRUE +#TOD: Test if ROF can be run +./xmlchange CUPID_RUN_ROF=FALSE From d8d1d4b63a3a2aedbc141bac192c5ed7bef2ecda Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 15 Jan 2026 00:18:35 -0700 Subject: [PATCH 15/47] Shift the CUPiD test to run f19 rather than f09, and IHist rather than I2000 --- cime_config/testdefs/testlist_clm.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 9a4ee06f07..771ea3ac87 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -100,12 +100,12 @@ - + - + From e6c38c2a31aebc8a7f471fc5e2c1f96357cf1534 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 26 Jan 2026 15:09:18 -0700 Subject: [PATCH 16/47] Update CUPiD to Will's land_only example version --- .gitmodules | 8 ++++---- tools/CUPiD | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 87618ac243..13dd28ff2f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -125,10 +125,10 @@ fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial # CUPiD does model post-processing path = tools/CUPiD #url = https://github.com/NCAR/CUPiD.git -url = https://github.com/TeaganKing/CUPiD.git -#fxtag = v0.5.0 -#fxtag = cesm-workflow-fixes -fxtag = 78147810891530c6ed3a89e1d197cfca7586974b +url = https://github.com/wwieder/CUPiD.git +#fxtag = v0.6.0 +#fxtag = land_only +fxtag = 30bd428b7139873382107b0a32624a7492e28a91 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 7814781089..30bd428b71 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 78147810891530c6ed3a89e1d197cfca7586974b +Subproject commit 30bd428b7139873382107b0a32624a7492e28a91 From 91e8267fc6cee9fb162ae1e21017a6a61ba60ffd Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 27 Jan 2026 01:00:08 -0700 Subject: [PATCH 17/47] Start adding a CUPiD system test, change the CUPiD test mod to use the new land_only example, add a hist_2000-2005 user-mod _include for CUPiD --- cime_config/SystemTests/sms_cupid.py | 71 +++++++++++++++++++ .../usermods_dirs/clm/CUPiD/include_user_mods | 1 + .../usermods_dirs/clm/CUPiD/shell_commands | 18 ++--- .../_includes/hist_2000-2005/shell_commands | 5 ++ 4 files changed, 86 insertions(+), 9 deletions(-) create mode 100644 cime_config/SystemTests/sms_cupid.py create mode 100644 cime_config/usermods_dirs/clm/CUPiD/include_user_mods create mode 100755 cime_config/usermods_dirs/clm/_includes/hist_2000-2005/shell_commands diff --git a/cime_config/SystemTests/sms_cupid.py b/cime_config/SystemTests/sms_cupid.py new file mode 100644 index 0000000000..23e6f3827f --- /dev/null +++ b/cime_config/SystemTests/sms_cupid.py @@ -0,0 +1,71 @@ +from CIME.SystemTests.sms import SMS + + +class SMS_CUPID(SMS): + def setup_indv( + self, clean=False, test_mode=False, reset=False, keep=False, disable_git=False + ): + """ + Perform an individual setup + """ + super().setup_indv( + clean=clean, + test_mode=test_mode, + reset=reset, + keep=keep, + disable_git=disable_git, + ) + # Make sure the st_archiver is turned on, as CUPiD only runs after it runs + self._case.set_value("DOUT_S", True) + + def run_indv( + self, + suffix="base", + st_archive=False, + submit_resubmits=None, + keep_init_generated_files=False, + ): + """ + Perform an individual run. Raises an EXCEPTION on fail. + + Just add the CUPiD phase after the standard run. + """ + super().run_indv( + suffix=suffix, + st_archive=st_archive, + submit_resubmits=submit_resubmits, + keep_init_generated_files=keep_init_generated_files, + ) + self._phase_modifying_call(CUPID_PHASE, self._cupid_case_test) + + def case_test_cupid(self, testdir="cupid_test"): + # create the run directory testdir + if os.path.exists(testdir): + logger.info("Removing existing test directory {}".format(testdir)) + shutil.rmtree(testdir) + # Check that the CUPid postprocessing directories and config file exist + cupid_dir = os.path.join(self._case.get_value("CASEROOT"), "cupid-postprocessing" ) + notebooks_dir = os.path.join(cupid_dir, "compute_notebooks") + data_dir = os.path.join(cupid_dir, "temp_data") + foreach dir in [cupid_dir, notebooks_dir, data_dir]: + expect( os.isdir(dir), + "CUPiD postprocessing directory {} does not exist".format(dir) ) + cupid_config = os.path.join(cupid_dir, "config.yml") + expect( os.isfile(cupid_config), + "CUPiD config file {} does not exist".format(cupid_config) ) + # TODO: Add more checks about more files that should exist + + + # TODO: Populate the testdir with data files, config files and notebooks from the cupid-postprocessing directory + + return True + + def _cupid_case_test(self): + # For the st_archiver this test is under the case object + # Here we create it in this object, but probably should be moved to under the case object in CIME + result = self.test_cupid() + with self._test_status: + if result: + self._test_status.set_status(CUPID_PHASE, TEST_PASS_STATUS) + else: + self._test_status.set_status(CUPID_PHASE, TEST_FAIL_STATUS) diff --git a/cime_config/usermods_dirs/clm/CUPiD/include_user_mods b/cime_config/usermods_dirs/clm/CUPiD/include_user_mods new file mode 100644 index 0000000000..20112a70eb --- /dev/null +++ b/cime_config/usermods_dirs/clm/CUPiD/include_user_mods @@ -0,0 +1 @@ +../_includes/hist_2000-2005 diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index cb86d88680..854605af4f 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -9,12 +9,10 @@ LND_ROOT=`./xmlquery --value COMP_ROOT_DIR_LND` CUPID_ROOT=`./xmlquery --value CUPID_ROOT` -# IF CUPID_ROOT is not set, it means case.setup hasn't run yet so run the generate script to get it configured -# This will result in env_postprocess.xml to be created in the case which is then edited below -# TODO: Make sure this is really needed! +# When I first tried this I thought I needed the following... if [ -z "$CUPID_ROOT" ]; then - CUPID_ROOT="$LND_ROOT/tools/CUPiD" - $CUPID_ROOT/helper_scripts/generate_cupid_config_for_cesm_case.py --cesm-root $SRCROOT --case-root . + echo "CUPID settings aren't done yet" + exit 5 fi # For a test case, make sure DOUT_S is TRUE @@ -40,13 +38,15 @@ fi ./xmlchange --force CUPID_STOP_N='$STOP_N' ./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' # TODO: This should maybe be turned on as a smoke test, and to check for the appropriate files in testing -./xmlchange CUPID_GEN_HTML=FALSE +./xmlchange CUPID_GEN_HTML=TRUE # TODO: Test with running more tasks ./xmlchange CUPID_NTASKS=1 ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE +# Use the land_only example +./xmlchange CUPID_EXAMPLE=land_only # TODO: Get CUPiD working with LDF under CESM -./xmlchange CUPID_RUN_LDF=FALSE +./xmlchange CUPID_RUN_LDF=TRUE ./xmlchange CUPID_RUN_LND=TRUE -#TOD: Test if ROF can be run -./xmlchange CUPID_RUN_ROF=FALSE +# TODO: Test if ROF can be run +./xmlchange CUPID_RUN_ROF=TRUE diff --git a/cime_config/usermods_dirs/clm/_includes/hist_2000-2005/shell_commands b/cime_config/usermods_dirs/clm/_includes/hist_2000-2005/shell_commands new file mode 100755 index 0000000000..b5e0ad368e --- /dev/null +++ b/cime_config/usermods_dirs/clm/_includes/hist_2000-2005/shell_commands @@ -0,0 +1,5 @@ +#!/bin/bash +# Setup for a IHist case to start in 2000 and run for 5 years +./xmlchange RUN_STARTDATE=2000-01-01 +./xmlchange STOP_OPTION=nyears +./xmlchange STOP_N=5 From 8c5904dcb9d4e7aff2743c43468ce0814a5cb748 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 27 Jan 2026 01:01:29 -0700 Subject: [PATCH 18/47] Change the name of the cupid test, since having the _c in the testname interprets it as a _C NINST test --- cime_config/SystemTests/{sms_cupid.py => smscupid.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename cime_config/SystemTests/{sms_cupid.py => smscupid.py} (100%) diff --git a/cime_config/SystemTests/sms_cupid.py b/cime_config/SystemTests/smscupid.py similarity index 100% rename from cime_config/SystemTests/sms_cupid.py rename to cime_config/SystemTests/smscupid.py From 04c3b25b715505d478e8032545bc508371bd9bd8 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 10 Feb 2026 01:55:58 -0700 Subject: [PATCH 19/47] Turn off LDF for default setup --- cime_config/usermods_dirs/clm/CUPiD/shell_commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index 854605af4f..a914e34b6a 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -46,7 +46,7 @@ fi # Use the land_only example ./xmlchange CUPID_EXAMPLE=land_only # TODO: Get CUPiD working with LDF under CESM -./xmlchange CUPID_RUN_LDF=TRUE +./xmlchange CUPID_RUN_LDF=FALSE ./xmlchange CUPID_RUN_LND=TRUE # TODO: Test if ROF can be run ./xmlchange CUPID_RUN_ROF=TRUE From d4e5826d88d0f7f1a9bf3cb6d1cc856d9819af49 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 10 Feb 2026 01:58:30 -0700 Subject: [PATCH 20/47] Simple list of archive tests for CUPiD options --- cime_config/testdefs/testlist_clm.xml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index c98903f4d0..f3438cdef6 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -100,13 +100,31 @@ - + - + + + + + + + + + + + + + + + + + + + From d333a3102445557b58692ec32b5da121b46d0c2c Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 10 Feb 2026 02:00:39 -0700 Subject: [PATCH 21/47] Simple archive test and CUPiD testmods for the different CUPiD options: LDF, ROF, ILAMB --- cime_config/SystemTests/smsar.py | 40 +++++++++++++++++++ .../clm/CUPiD_ILAMB/include_user_mods | 1 + .../clm/CUPiD_ILAMB/shell_commands | 4 ++ .../clm/CUPiD_LDF/include_user_mods | 1 + .../clm/CUPiD_LDF/shell_commands | 4 ++ .../clm/CUPiD_ROF/include_user_mods | 1 + .../clm/CUPiD_ROF/shell_commands | 4 ++ 7 files changed, 55 insertions(+) create mode 100644 cime_config/SystemTests/smsar.py create mode 100644 cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/include_user_mods create mode 100755 cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/include_user_mods create mode 100755 cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/include_user_mods create mode 100755 cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/shell_commands diff --git a/cime_config/SystemTests/smsar.py b/cime_config/SystemTests/smsar.py new file mode 100644 index 0000000000..c4b78959e3 --- /dev/null +++ b/cime_config/SystemTests/smsar.py @@ -0,0 +1,40 @@ +from CIME.SystemTests.sms import SMS +from ctsm_test_status import * + + +class SMSAR(SMS): + def setup_indv( + self, clean=False, test_mode=False, reset=False, keep=False, disable_git=False + ): + """ + Perform an individual setup + """ + super().setup_indv( + clean=clean, + test_mode=test_mode, + reset=reset, + keep=keep, + disable_git=disable_git, + ) + # Make sure the st_archiver is turned on, as CUPiD only runs after it runs + self._case.set_value("DOUT_S", True) + + def run_indv( + self, + suffix="base", + st_archive=True, + cupid=True, + submit_resubmits=None, + keep_init_generated_files=False, + ): + """ + Perform an individual run. Raises an EXCEPTION on fail. + + Just add the CUPiD phase after the standard run. + """ + super().run_indv( + suffix=suffix, + st_archive=st_archive, + submit_resubmits=submit_resubmits, + keep_init_generated_files=keep_init_generated_files, + ) diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/include_user_mods new file mode 100644 index 0000000000..19fdf1b2a9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/clm/CUPiD diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/shell_commands b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/shell_commands new file mode 100755 index 0000000000..0ec66c2ee9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ILAMB/shell_commands @@ -0,0 +1,4 @@ +#!/bin/bash +./xmlchange CUPID_ILAMB=TRUE +./xmlchange CUPID_LND=FALSE + diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/include_user_mods new file mode 100644 index 0000000000..19fdf1b2a9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/clm/CUPiD diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands new file mode 100755 index 0000000000..0d69af48e0 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands @@ -0,0 +1,4 @@ +#!/bin/bash +./xmlchange CUPID_LDF=TRUE +./xmlchange CUPID_LND=FALSE + diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/include_user_mods new file mode 100644 index 0000000000..19fdf1b2a9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/clm/CUPiD diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/shell_commands b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/shell_commands new file mode 100755 index 0000000000..e8b60e17e0 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_ROF/shell_commands @@ -0,0 +1,4 @@ +#!/bin/bash +./xmlchange CUPID_ROF=TRUE +./xmlchange CUPID_LND=FALSE + From 28fbcb833cfb9a7f66442ba37a4d81ae34296846 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 10 Feb 2026 02:02:13 -0700 Subject: [PATCH 22/47] Add more needed to get a full CUPiD test working --- cime_config/SystemTests/ctsm_test_status.py | 30 +++++++++++++++++++++ cime_config/SystemTests/smscupid.py | 17 +++++++++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 cime_config/SystemTests/ctsm_test_status.py diff --git a/cime_config/SystemTests/ctsm_test_status.py b/cime_config/SystemTests/ctsm_test_status.py new file mode 100644 index 0000000000..3b9807a02e --- /dev/null +++ b/cime_config/SystemTests/ctsm_test_status.py @@ -0,0 +1,30 @@ + +from CIME.test_status import * + +CUPID_PHASE = "CUPID" + +ALL_PHASES = [ + CREATE_NEWCASE_PHASE, + XML_PHASE, + SETUP_PHASE, + NAMELIST_PHASE, + SHAREDLIB_BUILD_PHASE, + MODEL_BUILD_PHASE, + SUBMIT_PHASE, + RUN_PHASE, + COMPARE_PHASE, + BASELINE_PHASE, + THROUGHPUT_PHASE, + MEMCOMP_PHASE, + MEMLEAK_PHASE, + STARCHIVE_PHASE, + CUPID_PHASE, + GENERATE_PHASE, +] + +# Extend the TestStatus class to include the CUPID phase and have CUPID phase within ALL_PHASES +class CTSMTestStatus(TestStatus): + + def __init__(self, case): + super().__init__(case, ALL_PHASES) + self._test_status = CTSMTestStatus(test_dir=case.get_value("CASEROOT"), test_name=self.case.get_value("CASEBASEID") ) \ No newline at end of file diff --git a/cime_config/SystemTests/smscupid.py b/cime_config/SystemTests/smscupid.py index 23e6f3827f..14a82f75c7 100644 --- a/cime_config/SystemTests/smscupid.py +++ b/cime_config/SystemTests/smscupid.py @@ -1,7 +1,15 @@ from CIME.SystemTests.sms import SMS +from ctsm_test_status import * -class SMS_CUPID(SMS): +class SMSCUPID(SMS): + def __init__(self, case): + super().__init__(case) + self._test_status = CTSMTestStatus( + test_dir=self._case.get_value("CASEROOT"), + test_name=self._case.get_value("CASEBASEID"), + ) + def setup_indv( self, clean=False, test_mode=False, reset=False, keep=False, disable_git=False ): @@ -21,7 +29,8 @@ def setup_indv( def run_indv( self, suffix="base", - st_archive=False, + st_archive=True, + cupid=True, submit_resubmits=None, keep_init_generated_files=False, ): @@ -47,7 +56,7 @@ def case_test_cupid(self, testdir="cupid_test"): cupid_dir = os.path.join(self._case.get_value("CASEROOT"), "cupid-postprocessing" ) notebooks_dir = os.path.join(cupid_dir, "compute_notebooks") data_dir = os.path.join(cupid_dir, "temp_data") - foreach dir in [cupid_dir, notebooks_dir, data_dir]: + for dir in [cupid_dir, notebooks_dir, data_dir]: expect( os.isdir(dir), "CUPiD postprocessing directory {} does not exist".format(dir) ) cupid_config = os.path.join(cupid_dir, "config.yml") @@ -58,6 +67,8 @@ def case_test_cupid(self, testdir="cupid_test"): # TODO: Populate the testdir with data files, config files and notebooks from the cupid-postprocessing directory + # TODO: Save various files to the baseline directory to use for BASELINE comparison + return True def _cupid_case_test(self): From a33dfead33e5c2e9465a008a4b6447b12078dfa3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Tue, 10 Feb 2026 02:03:03 -0700 Subject: [PATCH 23/47] Add setup for SMSAR and SMSCUPID tests --- cime_config/config_tests.xml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml index c5c6749392..a2b153c92a 100644 --- a/cime_config/config_tests.xml +++ b/cime_config/config_tests.xml @@ -185,6 +185,32 @@ This defines various CTSM-specific system tests $STOP_N + + Run a smoke startup test with st_archive on + 1 + TRUE + FALSE + nyears + 5 + never + $STOP_OPTION + $STOP_N + + + + Run a smoke startup test with CUPiD on + 1 + TRUE + FALSE + TRUE + + nyears + 5 + never + $STOP_OPTION + $STOP_N + + @@ -103,28 +104,38 @@ + - + + + + + + + + + + - + - + - + - + From dc7043da21017a12f76d33556be85b1f519d2042 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Wed, 11 Feb 2026 15:28:15 -0700 Subject: [PATCH 27/47] Update CUPiD to Will's latest --- .gitmodules | 2 +- tools/CUPiD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 21534a33da..93a090c432 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,7 +128,7 @@ path = tools/CUPiD url = https://github.com/wwieder/CUPiD.git #fxtag = v0.6.0 #fxtag = land_only -fxtag = 30bd428b7139873382107b0a32624a7492e28a91 +fxtag = 6b12f0b093e2f9f0d91061960975270b63cfad5a fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 30bd428b71..6b12f0b093 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 30bd428b7139873382107b0a32624a7492e28a91 +Subproject commit 6b12f0b093e2f9f0d91061960975270b63cfad5a From 9588dd328c9167bec98d79bf3243618fc020a30f Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 11:29:29 -0700 Subject: [PATCH 28/47] Turn HTML off, don't set TASKS or RUN_TYPE want to see if we can set RUN_TYPE elsewhere --- cime_config/usermods_dirs/clm/CUPiD/shell_commands | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index f1ceaa3098..ad49869d48 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -33,14 +33,14 @@ fi # TODO: Make sure STOP_OPTION is nyears ./xmlchange --force CUPID_BASE_STOP_OPTION='$STOP_OPTION' # TODO: Have this set based on what CLM_BLDNML_OPTS has -./xmlchange CUPID_RUN_TYPE=SP +#./xmlchange CUPID_RUN_TYPE=SP ./xmlchange --force CUPID_STARTDATE='$RUN_STARTDATE' ./xmlchange --force CUPID_STOP_N='$STOP_N' ./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' # TODO: This should maybe be turned on as a smoke test, and to check for the appropriate files in testing -./xmlchange CUPID_GEN_HTML=TRUE +./xmlchange CUPID_GEN_HTML=FALSE # TODO: Test with running more tasks -./xmlchange CUPID_NTASKS=1 +#./xmlchange CUPID_NTASKS=1 ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE # Use the land_only example From 1b0b82aaedded2d685775f9444f88044f6dbcb58 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 11:31:08 -0700 Subject: [PATCH 29/47] Rename SSMAR system tests to SMSPOSTPROC --- cime_config/SystemTests/smsar.py | 40 -------------------------- cime_config/SystemTests/smspostproc.py | 19 ++++++++++++ cime_config/config_tests.xml | 5 ++-- 3 files changed, 22 insertions(+), 42 deletions(-) delete mode 100644 cime_config/SystemTests/smsar.py create mode 100644 cime_config/SystemTests/smspostproc.py diff --git a/cime_config/SystemTests/smsar.py b/cime_config/SystemTests/smsar.py deleted file mode 100644 index c4b78959e3..0000000000 --- a/cime_config/SystemTests/smsar.py +++ /dev/null @@ -1,40 +0,0 @@ -from CIME.SystemTests.sms import SMS -from ctsm_test_status import * - - -class SMSAR(SMS): - def setup_indv( - self, clean=False, test_mode=False, reset=False, keep=False, disable_git=False - ): - """ - Perform an individual setup - """ - super().setup_indv( - clean=clean, - test_mode=test_mode, - reset=reset, - keep=keep, - disable_git=disable_git, - ) - # Make sure the st_archiver is turned on, as CUPiD only runs after it runs - self._case.set_value("DOUT_S", True) - - def run_indv( - self, - suffix="base", - st_archive=True, - cupid=True, - submit_resubmits=None, - keep_init_generated_files=False, - ): - """ - Perform an individual run. Raises an EXCEPTION on fail. - - Just add the CUPiD phase after the standard run. - """ - super().run_indv( - suffix=suffix, - st_archive=st_archive, - submit_resubmits=submit_resubmits, - keep_init_generated_files=keep_init_generated_files, - ) diff --git a/cime_config/SystemTests/smspostproc.py b/cime_config/SystemTests/smspostproc.py new file mode 100644 index 0000000000..ce1d393feb --- /dev/null +++ b/cime_config/SystemTests/smspostproc.py @@ -0,0 +1,19 @@ +from CIME.SystemTests.sms import SMS + +class SMSPOSTPROC(SMS): + def setup_indv( + self, clean=False, test_mode=False, reset=False, keep=False, disable_git=False + ): + """ + Perform an individual setup + """ + super().setup_indv( + clean=clean, + test_mode=test_mode, + reset=reset, + keep=keep, + disable_git=disable_git, + ) + # Make sure the st_archiver is turned on, as CUPiD only runs after it runs + self._case.set_value("DOUT_S", True) + self._case.set_value("RUN_POSTPROCESSING", True) diff --git a/cime_config/config_tests.xml b/cime_config/config_tests.xml index a2b153c92a..5b32e16829 100644 --- a/cime_config/config_tests.xml +++ b/cime_config/config_tests.xml @@ -185,10 +185,11 @@ This defines various CTSM-specific system tests $STOP_N - - Run a smoke startup test with st_archive on + + Run a smoke startup test with st_archive and post-processing on 1 TRUE + TRUE FALSE nyears 5 From 7880d3538c3f482665088705a27d9519aac02c23 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 13:08:47 -0700 Subject: [PATCH 30/47] Add references to CUPiD documentation as per review --- README.DIAGNOSTICS | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.DIAGNOSTICS b/README.DIAGNOSTICS index df2cf77d75..4542ce76cc 100644 --- a/README.DIAGNOSTICS +++ b/README.DIAGNOSTICS @@ -5,7 +5,7 @@ Land Diagnostics Cheat Sheet is here: This document has more details on more options and such -https://docs.google.com/document/d/1ziZWGgaj9FxgR6WRHyCAZnzIc6-4ezqfUDDpQv4MzUI/edit?tab=t.0 +https://ncar.github.io/CUPiD/run_cesm.html ## Initial setup steps to do first time @@ -13,10 +13,10 @@ This step is something you need to do the first time you want to run CUPiD for a And you only need to do it again if the CUPiD environment changes. ``` shell -# Setup the conda environments -# TODO: Make this use py_env_create? -mamba env create --yes -f tools/cupid/environments/cupid-infrastructure.yml -mamba env create --yes -f tools/cupid/environments/cupid-analysis.yml +# CUPiD instructions for this is here: https://ncar.github.io/CUPiD/index.html#installing +cd tools/CUPiD +mamba env create --yes -f environments/cupid-infrastructure.yml +mamba env create --yes -f environments/cupid-analysis.yml # Check that the environment is valid conda activate cupid-infrastructure which cupid-diagnostics @@ -24,7 +24,8 @@ which cupid-diagnostics # $HOME/conda-envs/cupid-infrastructure/bin/cupid-diagnostics # If it returns "Command not found." something is wrong with the environment - +# Instructions for the next part are here: +# https://ncar.github.io/CUPiD/index.html#note # Now make sure the conda environments can be used by Jupyter notebooks conda activate cupid-analysis python -m ipykernel install --user --name=cupid-analysis From fcd4f5f44f1ae12e706ad96103664d58b7a3bd8a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 13:45:36 -0700 Subject: [PATCH 31/47] Remove the bit about DOUT_S, as the system tests make this right, and this didn't work, add setting of the base case to usefor comparision, adjust some of the settings and get it setup for the general case --- .../usermods_dirs/clm/CUPiD/shell_commands | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index ad49869d48..5d0018592c 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -15,38 +15,46 @@ if [ -z "$CUPID_ROOT" ]; then exit 5 fi -# For a test case, make sure DOUT_S is TRUE -# TODO: Add a proper SystemTest so this is handled correctly in the test -TEST=`./xmlquery --value TEST` -if [ "$TEST" == "TRUE" ]; then - ./xmlchange DOUT_S=TRUE --file env_test.xml -fi - # # Set CUPiD parameters for what a CTSM case needs to do # # Set the standard CUPiD baseline case to compare to -./xmlchange --force CUPID_BASELINE_CASE='$CASE' -./xmlchange --force CUPID_BASE_STARTDATE='$RUN_STARTDATE' -./xmlchange --force CUPID_BASE_STOP_N='$STOP_N' -# TODO: Make sure STOP_OPTION is nyears -./xmlchange --force CUPID_BASE_STOP_OPTION='$STOP_OPTION' +./xmlchange CUPID_BASELINE_CASE='CESM_output_for_testing/ctsm5.4.002_clm6_BGCcrop_crujra_4x5_HIST" +# NOTE: This is currently only valid on Derecho +# TODO: Look into having this available under GDEX and available anywhere via download +./xmlchange CUPID_BASELINE_ROOT='/glade/campaign/cesm/development/cross-wg/diagnostic_framework' +./xmlchange CUPID_BASE_STARTDATE='1850-01-01' +./xmlchange CUPID_BASE_CLIMO_END_YEAR=2023 +./xmlchange CUPID_BASE_CLIMO_N_YEAR=25 +./xmlchange CUPID_BASE_STOP_N=172 +./xmlchange CUPID_BASE_STOP_OPTION='nyears' + +# +# General setup based on the start and length of the case being run +# # TODO: Have this set based on what CLM_BLDNML_OPTS has #./xmlchange CUPID_RUN_TYPE=SP -./xmlchange --force CUPID_STARTDATE='$RUN_STARTDATE' -./xmlchange --force CUPID_STOP_N='$STOP_N' -./xmlchange --force CUPID_STOP_OPTION='$STOP_OPTION' -# TODO: This should maybe be turned on as a smoke test, and to check for the appropriate files in testing +./xmlchange CUPID_STARTDATE='$RUN_STARTDATE' +./xmlchange CUPID_STOP_N='$STOP_N' +# TODO: Check that STOP_OPTION is nyears +./xmlchange CUPID_STOP_OPTION='$STOP_OPTION' + +# +# Setting for specific CUPiD diagnostics to run +# ./xmlchange CUPID_GEN_HTML=FALSE # TODO: Test with running more tasks #./xmlchange CUPID_NTASKS=1 +# TODO: Trigger these to be FALSE only when it is an I compset ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE # Use the land_only example ./xmlchange CUPID_EXAMPLE=land_only -# TODO: Get CUPiD working with LDF under CESM ./xmlchange CUPID_RUN_LDF=FALSE +./xmlchange CUPID_RUN_ILAMB=FALSE +# NOTE: CUPID_RUN_LND must be set to TRUE for either LDF or ILAMB +# and you should pick one or the other as LND needs key-metrics from one or the other ./xmlchange CUPID_RUN_LND=TRUE # TODO: Test if ROF can be run ./xmlchange CUPID_RUN_ROF=FALSE From 12a59b7b8f18811697cdfe0ab0df8c51166e861a Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 13:52:50 -0700 Subject: [PATCH 32/47] Add a note that you have to remake the conda environments if you use a different clone of CTSM --- README.DIAGNOSTICS | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.DIAGNOSTICS b/README.DIAGNOSTICS index 4542ce76cc..c1075318df 100644 --- a/README.DIAGNOSTICS +++ b/README.DIAGNOSTICS @@ -10,7 +10,8 @@ https://ncar.github.io/CUPiD/run_cesm.html ## Initial setup steps to do first time This step is something you need to do the first time you want to run CUPiD for a case. -And you only need to do it again if the CUPiD environment changes. +And you only need to do it again if the CUPiD environment changes -- or if you need to +setup the environment for a different CTSM checkout. ``` shell # CUPiD instructions for this is here: https://ncar.github.io/CUPiD/index.html#installing @@ -33,6 +34,14 @@ conda activate cupid-infrastructure python -m ipykernel install --user --name=cupid-infrastructure ``` + +#### IMPORTANT NOTE: You have to REMAKE THE CUPiD ENVIRONMENTS for a different CTSM Checkout + + + +> [!IMPORTANT] +> If you want to use CUPiD in a different clone of CTSM -- you'll need to remake the environments there. + ## Create your case using the CUPiD user-mod This is similar to setting up any case, such as documented in the README and Quickstart guides. From 513bad9d465bbde25484698f754f10c01e4d4164 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 13:54:34 -0700 Subject: [PATCH 33/47] Adjust the CUPiD tests, make sure there are ones for LDF, ILAMB, plain, LDF with SP, LDF with I2000, and ROF, as well as web --- cime_config/testdefs/testlist_clm.xml | 41 ++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index a0ee91160a..33346a4fd3 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -101,7 +101,7 @@ - + @@ -111,33 +111,66 @@ - + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From be2ee8d70982e22066ad2eed8c51cda5e1b18e7d Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 14:02:05 -0700 Subject: [PATCH 34/47] Remove subgroup as it is not a valid option for testlist in cime --- cime_config/testdefs/testlist_clm.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 33346a4fd3..6e4ee83bdf 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -117,7 +117,6 @@ - @@ -127,7 +126,6 @@ - @@ -137,7 +135,6 @@ - @@ -147,7 +144,6 @@ - @@ -157,7 +153,6 @@ - @@ -167,7 +162,6 @@ - From ccdf7174fcdd6f115b77796bd7652d0c68507fd3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 14:11:36 -0700 Subject: [PATCH 35/47] Fix ending quote --- cime_config/usermods_dirs/clm/CUPiD/shell_commands | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index 5d0018592c..e9bffa34f9 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -20,7 +20,7 @@ fi # # Set the standard CUPiD baseline case to compare to -./xmlchange CUPID_BASELINE_CASE='CESM_output_for_testing/ctsm5.4.002_clm6_BGCcrop_crujra_4x5_HIST" +./xmlchange CUPID_BASELINE_CASE='CESM_output_for_testing/ctsm5.4.002_clm6_BGCcrop_crujra_4x5_HIST' # NOTE: This is currently only valid on Derecho # TODO: Look into having this available under GDEX and available anywhere via download ./xmlchange CUPID_BASELINE_ROOT='/glade/campaign/cesm/development/cross-wg/diagnostic_framework' From 47a2d1760e3cc4950e823dbddea37cdb73902a72 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 14:16:56 -0700 Subject: [PATCH 36/47] Change the wallclock for the CUPiD tests to 40 minutes as the 5-year test takes a half hour --- cime_config/testdefs/testlist_clm.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 6e4ee83bdf..9ab9e605dd 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -107,7 +107,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -134,7 +134,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -161,7 +161,7 @@ - + From fccfe813f751caaf12c3ed6dc92b0079e8b9b0e3 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 15:13:29 -0700 Subject: [PATCH 37/47] Add the CUPiD_web testmod --- .../testdefs/testmods_dirs/clm/CUPiD_web/include_user_mods | 1 + .../testdefs/testmods_dirs/clm/CUPiD_web/shell_commands | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/CUPiD_web/include_user_mods create mode 100755 cime_config/testdefs/testmods_dirs/clm/CUPiD_web/shell_commands diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/include_user_mods new file mode 100644 index 0000000000..19fdf1b2a9 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/include_user_mods @@ -0,0 +1 @@ +../../../../usermods_dirs/clm/CUPiD diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/shell_commands b/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/shell_commands new file mode 100755 index 0000000000..cd3b5af047 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_web/shell_commands @@ -0,0 +1,3 @@ +#!/bin/bash +./xmlchange CUPID_GEN_HTML=TRUE + From 9cd53ffb43ff7ee4210fec0a3afa6df88c27d750 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 13 Feb 2026 15:55:50 -0700 Subject: [PATCH 38/47] The ROF CUPiD test needs to be at f09 resolution --- cime_config/testdefs/testlist_clm.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index 9ab9e605dd..e00bfa2d6f 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -156,13 +156,14 @@ - + + From 9de67a4b29c6e930ba8e568c0a7ab7b9b0363114 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 19 Feb 2026 11:17:50 -0700 Subject: [PATCH 39/47] Update CUPiD to latest version from yesterday --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 93a090c432..08b0c9d49a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,7 +128,7 @@ path = tools/CUPiD url = https://github.com/wwieder/CUPiD.git #fxtag = v0.6.0 #fxtag = land_only -fxtag = 6b12f0b093e2f9f0d91061960975270b63cfad5a +fxtag = 0adf7677e1f3189951d3d1766617bb96c5aa9686 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git From 3ce39c9acef330136d64550bbfdd8d3c695c74ca Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 19 Feb 2026 11:19:04 -0700 Subject: [PATCH 40/47] Update CUPiD submodule --- tools/CUPiD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CUPiD b/tools/CUPiD index 6b12f0b093..0adf7677e1 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 6b12f0b093e2f9f0d91061960975270b63cfad5a +Subproject commit 0adf7677e1f3189951d3d1766617bb96c5aa9686 From 2f81186f4c483db60055b5c3582d5f877270ec19 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Thu, 19 Feb 2026 16:59:20 -0700 Subject: [PATCH 41/47] Update to latest CUPiD changes, fix LDF and ILAMB issues --- .gitmodules | 2 +- tools/CUPiD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 08b0c9d49a..2cc827c74d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,7 +128,7 @@ path = tools/CUPiD url = https://github.com/wwieder/CUPiD.git #fxtag = v0.6.0 #fxtag = land_only -fxtag = 0adf7677e1f3189951d3d1766617bb96c5aa9686 +fxtag = 1c907b4e35968ed40fa9a84f240048e6780fdb13 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 0adf7677e1..1c907b4e35 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 0adf7677e1f3189951d3d1766617bb96c5aa9686 +Subproject commit 1c907b4e35968ed40fa9a84f240048e6780fdb13 From e9e1a74fbadc9b21a77d8c6a0e941fbbdd27c302 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Fri, 20 Feb 2026 01:52:25 -0700 Subject: [PATCH 42/47] Set base case settings --- .../testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands index da094340a6..8f0a44bdf1 100755 --- a/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/CUPiD_LDF/shell_commands @@ -1,3 +1,8 @@ #!/bin/bash ./xmlchange CUPID_RUN_LDF=TRUE +# Base case setttings to match the case just run +./xmlchange CUPID_BASE_STARTDATE='$RUN_STARTDATE' +./xmlchange CUPID_BASE_CLIMO_END_YEAR=2005 +./xmlchange CUPID_BASE_CLIMO_N_YEAR='$STOP_N' +./xmlchange CUPID_BASE_STOP_N='$STOP_N' From 9059b4fd53a6587fe4fc3459315db1cfbd5f4374 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 23 Feb 2026 11:29:09 -0700 Subject: [PATCH 43/47] Point to latest land_only --- .gitmodules | 4 ++-- tools/CUPiD | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2cc827c74d..58bdd433c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -127,8 +127,8 @@ path = tools/CUPiD #url = https://github.com/NCAR/CUPiD.git url = https://github.com/wwieder/CUPiD.git #fxtag = v0.6.0 -#fxtag = land_only -fxtag = 1c907b4e35968ed40fa9a84f240048e6780fdb13 +#branch = land_only +fxtag = 93c78a1960e7ed0d03df2af3857b761bf9f916cc fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 1c907b4e35..93c78a1960 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 1c907b4e35968ed40fa9a84f240048e6780fdb13 +Subproject commit 93c78a1960e7ed0d03df2af3857b761bf9f916cc From ed1ba8de3ed183602f168bda17602a9e0d8300ad Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 23 Feb 2026 15:46:15 -0700 Subject: [PATCH 44/47] Update CUPiD to remove the softlink for the LDF config file --- .gitmodules | 2 +- tools/CUPiD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 58bdd433c1..0bae8190dd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -128,7 +128,7 @@ path = tools/CUPiD url = https://github.com/wwieder/CUPiD.git #fxtag = v0.6.0 #branch = land_only -fxtag = 93c78a1960e7ed0d03df2af3857b761bf9f916cc +fxtag = dd65b0be6d70a3158549d636ec26376f94c27d40 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git diff --git a/tools/CUPiD b/tools/CUPiD index 93c78a1960..dd65b0be6d 160000 --- a/tools/CUPiD +++ b/tools/CUPiD @@ -1 +1 @@ -Subproject commit 93c78a1960e7ed0d03df2af3857b761bf9f916cc +Subproject commit dd65b0be6d70a3158549d636ec26376f94c27d40 From ababf70cb8137323ab797f52919defb161710bd6 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 23 Feb 2026 15:58:28 -0700 Subject: [PATCH 45/47] Get the settings to align with what we want based on the Tutorial discussion notes: https://docs.google.com/document/d/1GFJCK5PaaGY5PHohebJd-EVUlKaF9TctgCMXAEsZwCw --- .../usermods_dirs/clm/CUPiD/shell_commands | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index e9bffa34f9..f8b7cd8d97 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -20,14 +20,14 @@ fi # # Set the standard CUPiD baseline case to compare to -./xmlchange CUPID_BASELINE_CASE='CESM_output_for_testing/ctsm5.4.002_clm6_BGCcrop_crujra_4x5_HIST' +./xmlchange CUPID_BASELINE_CASE='ctsm5.4.002_clm6_BGCcrop_crujra_4x5_HIST' # NOTE: This is currently only valid on Derecho # TODO: Look into having this available under GDEX and available anywhere via download -./xmlchange CUPID_BASELINE_ROOT='/glade/campaign/cesm/development/cross-wg/diagnostic_framework' -./xmlchange CUPID_BASE_STARTDATE='1850-01-01' -./xmlchange CUPID_BASE_CLIMO_END_YEAR=2023 -./xmlchange CUPID_BASE_CLIMO_N_YEAR=25 -./xmlchange CUPID_BASE_STOP_N=172 +./xmlchange CUPID_BASELINE_ROOT='/glade/campaign/cesm/development/cross-wg/diagnostic_framework/CESM_output_for_testing' +./xmlchange CUPID_BASE_STARTDATE='1995-01-01' +./xmlchange CUPID_BASE_CLIMO_END_YEAR=1995 +./xmlchange CUPID_BASE_CLIMO_N_YEAR=10 +./xmlchange CUPID_BASE_STOP_N=20 ./xmlchange CUPID_BASE_STOP_OPTION='nyears' # @@ -43,15 +43,16 @@ fi # # Setting for specific CUPiD diagnostics to run # -./xmlchange CUPID_GEN_HTML=FALSE +# NOTE: Create webpages for Tutorial, for testing have this done seperately +./xmlchange CUPID_GEN_HTML=TRUE # TODO: Test with running more tasks #./xmlchange CUPID_NTASKS=1 # TODO: Trigger these to be FALSE only when it is an I compset ./xmlchange CUPID_RUN_ADF=FALSE ./xmlchange CUPID_RUN_ALL=FALSE -# Use the land_only example +# Use the land_only example, with LDF on and ILAMB off ./xmlchange CUPID_EXAMPLE=land_only -./xmlchange CUPID_RUN_LDF=FALSE +./xmlchange CUPID_RUN_LDF=TRUE ./xmlchange CUPID_RUN_ILAMB=FALSE # NOTE: CUPID_RUN_LND must be set to TRUE for either LDF or ILAMB # and you should pick one or the other as LND needs key-metrics from one or the other From 2da82e552dec41a2e934943597cc1535c0a323f9 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 23 Feb 2026 17:16:30 -0700 Subject: [PATCH 46/47] Set the CUPID timeseries directory to the cupid_output location --- cime_config/usermods_dirs/clm/CUPiD/shell_commands | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index f8b7cd8d97..b9a227615c 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -39,6 +39,8 @@ fi ./xmlchange CUPID_STOP_N='$STOP_N' # TODO: Check that STOP_OPTION is nyears ./xmlchange CUPID_STOP_OPTION='$STOP_OPTION' +# Put the time-series directory under the CUPID output +./xmlchange CUPID_TS_DIR='$CIME_OUTPUT_ROOT/cupid_output' # # Setting for specific CUPiD diagnostics to run From 65cc4736a33ea0f031a7a59713d2ff115b7fc267 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Mon, 23 Feb 2026 22:36:51 -0700 Subject: [PATCH 47/47] Two settings that I missed --- cime_config/usermods_dirs/clm/CUPiD/shell_commands | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cime_config/usermods_dirs/clm/CUPiD/shell_commands b/cime_config/usermods_dirs/clm/CUPiD/shell_commands index b9a227615c..d0a8b5382d 100755 --- a/cime_config/usermods_dirs/clm/CUPiD/shell_commands +++ b/cime_config/usermods_dirs/clm/CUPiD/shell_commands @@ -33,6 +33,8 @@ fi # # General setup based on the start and length of the case being run # +./xmlchange CUPID_CLIMO_END_YEAR=2004 +./xmlchange CUPID_CLIMO_N_YEAR='$STOP_N' # TODO: Have this set based on what CLM_BLDNML_OPTS has #./xmlchange CUPID_RUN_TYPE=SP ./xmlchange CUPID_STARTDATE='$RUN_STARTDATE' @@ -45,6 +47,7 @@ fi # # Setting for specific CUPiD diagnostics to run # +./xmlchange CUPID_GEN_TIMESERIES=FALSE # NOTE: Create webpages for Tutorial, for testing have this done seperately ./xmlchange CUPID_GEN_HTML=TRUE # TODO: Test with running more tasks