NCAR diagnostics package at NSC

Directory list:

5.6 The NCAR AMWG diagnostics package version 5.6.

Level of support

Tier 2 NSC has only limited experience with this software, but we will try to help as much as possible. We have ran some tests, for example, if the program comes with a test suite, but they may be far from exhaustive. We will try to install and test new versions, as soon as we can.

Please see the page describing our software support categories for more information.
You can also contact for further information.

The NCAR AMWG diagnostics package computes climatological means of specified simulations and produces plots and tables of the mean climate in a variety of formats. The diagnostics package can be used to compare two CCSM (CAM) model simulations or for comparing a model simulation to the observational and reanalysis data. (Information about the AMWG datasets can be found in the Climate Data Guide.)

The AMWG diagnostics package is generally supported by Hamish Struthers (

How to setup

The diagnostics package is run using the diag121205_triolith.csh script. Copy the default diag121205_triolith.csh script to a local folder:

cp /software/apps/NCARdiag/diag121205_triolith.csh /home/${USER}/CESMdiags

Edit your local version of the diag121205_triolith.csh file. The most important modifications are:

Line Description
104 test_casename: specific case name for your simulation. This corresponds to the CESM case name.
109 diag_dir: path to model output and workspace (suggestion to use /nobackup/global/${USER}/)
112 test_path_history: path to your monthly mean model output files (default=${diag_dir}/archive/${test_casename}/atm/hist/)
118 test_path_climo: working directory that stores the climatological means from your simulation (default=/nobackup/global/${USER}/NCARdiag/climo/<test_casename>). Note: the climatological means are calculated by the NCAR diagnostic package itself.
120 test_path_diag: working directory where plots and html files are generated (default=/nobackup/global/${USER}/NCARdiag/diag/<test_casename>). Note: this folder is where the final output .tar is generated.

(Note: test_path_HPSS is not used on triolith)

The choice of comparing two model simulations or one simulation with observational and reanalysis data is determined by the CNTL variable (line 133). If CNTL = OBS the ‘test’ simulation will be compared with observational and reanalysis data. If CNTL = USER then two model simulations will be compared.

If CNTL = USER (comparison of two model simulations) then additional variables need to be set:

Line Description
143 cntl_casename: equivalent of test_casename (see above) for the second simulation
148 diag_dir: path to model output and workspace (suggestion to use /nobackup/global/${USER}/)
151 cntl_path_history: equivalent of test_path_history (see above) for the second simulation
157 cntl_path_climo: equivalent of test_path_climo (see above) for the second simulation (default=/nobackup/global/${USER}/NCARdiag/climo/<cntl_casename>)
159 cntl_path_diag: equivalent of test_path_diag (see above) for the second simulation (default=/nobackup/global/${USER}/NCARdiag/diag/<cntl_casename>)

The time inverval for the comparison is set on lines 186 (first year) and 187 (number of years). These variables determine the climatological averaging period for the ‘test’ simulation (see above).

Lines 175 and 176: if you are re-running the diagnostic package you can switch off the calculation of climatological means as the files are already calculated and stored. This saves a little time running the diagnostics.

Lines 291 to 236 provide a set of options to define which plots/comparisons are calculated.

How to run

The NCL and nco modules must be loaded before the NCAR diagnostics package can be run:

module load ncl/6.1.2
module load nco/4.2

The convert command (required to convert plots from ps/eps to png) is only installed on the login nodes of triolith and so the diag121205_triolith.csh script must be run on the login nodes rather than as a batch script or from an ‘interactive’ session, however it is not recommended that the script be run interactively on the login nodes. Instead the diag121205_triolith.csh script can be run in the background using:

./diag121205_triolith.csh &> diag.log &

The final output is can be found in the ‘test_path_diag’ file and is a .tar file (${test_casename}-obs.tar or ${test_casename}-${cntl_casename}.tar). Copy this file to your local workstation, untar (tar xvf .tar) and open the’index.html’ file using your favorite web browser.