Skip to content

Installing CUPID

Erik Kluzek edited this page Feb 17, 2026 · 44 revisions

Installing CUPiD

This page follows the CUPiD Installation Documentation, with some tweaks specific to the NCAR super computer.

Checkout CTSM with CUPiD

cd /work/$USER
git clone --origin -b CUPiD escomp https://github.com/ESCOMP/CTSM.git ctsm_cupid_2026
cd ctsm_cupid_2026
./bin/git-fleximod update

Checkpoint #1

At this point you should have a running JupyterHub instance.

Task 0: Open a Terminal in JupyterHub for this Activity

0.1 Navigate to your ctsm_cupid_2026 directory Go to the directory you created above. The full path to this should be: /glade/work/${USER}/ctsm_cupid_2026. To access this directory:

Click File in the top left and select Open from Path…

In the pop-up field enter: /work/${USER}/ctsm_cupid_2026

Note that JupyterHub references the filesystem relative to /glade, so we don’t need include that part of the path in step 2 above.

0.2 Open a terminal Open a Terminal instance by scrolling all the way down in the launcher tab and selecting Terminal. Jupyter Terminal This will open a terminal with the following prompt: USERNAME@crhtcXX:/glade/work/USERNAME/ctsm_cupid_2026>

Task 1: Install CUPiD Environments

CUPiD is available from the NCAR organization on github.com. And comes with the version of CTSM that you checked out above (in the tools/CUPiD subdirectory). It requires conda to manage a few different python environments. The NCAR system administrators provide conda through a module, which you can access by running

module load conda

Checkpoint #2

At this point you should have an open terminal in JupyterHub and the current working directory should be your ctsm_cupid_2026 workshop directory.

The rest of this tutorial will refer to the location with CUPiD in the CTSM checkout as ${CUPID_ROOT}. To be able to copy and paste blocks of commands directly, we need to add the variable to your environment.

Most of you are using bash or zsh, which have been the default shell on Linux and Unix computers for a while now. To set the environment variable run

cd /work/$USER
cd ctsm_cupid_2026
cd tools/CUPiD
export CUPID_ROOT=`pwd -P`

Note: This environment variable only exists in this specific terminal. It will need to exported again if you open a separate terminal, unless you modify your start files (see the NCAR documentation for this process for more information).

Using a different shell?

1.2: Install two conda environments CUPiD needs a python environment with specific packages installed to run the CUPiD tools, while the diagnostic notebooks provided with CUPiD need a different set of packages.

To run CUPiD itself we use the (cupid-infrastructure) environment, then CUPiD runs the diagnostics notebooks with (cupid-analysis). We will use mamba to install these environments and the --yes option to avoid mamba waiting for approval before continuing with the install:

Install (cupid-infrastructure) and (cupid-analysis)

cd ${CUPID_ROOT}
mamba env create -f environments/cupid-infrastructure.yml --yes && \
mamba env create -f environments/cupid-analysis.yml --yes

Notes:

This is two separate commands separated by &&; the second command (installing (cupid-analysis)) will only run if the first command (installing (cupid-infrastructure) finishes successfully). Also, the \ is a line continuation operator - without it, the command would be on a single line and very long.

If you remove the --yes flag, mamba will ask you to confirm the installation after it determines what packages will be installed.

Clone this wiki locally