Skip to content

Running CLM diagnostics

goldy edited this page Oct 30, 2024 · 1 revision

This page contains instructions for a few ways of running CLM diagnostics with diag_run.

In the examples below, it is assumed that you are in the bin directory of a clone of this repository. For your use, replace <n1850.ne30_tn14.hybrid.20240829> with your case name.

  1. For comparing new CLM with observations (model-obs comparision)

One should use -m ctsm to indicate it is processing the new CLM.

./diag_run -m ctsm -c <n1850.ne30_tn14.hybrid.20240829> -s 1 -e 14 -i /projects/NS9560K-datalake/noresm3/case

Sample output: https://ns9560k.web.sigma2.no/datalake/diagnostics/noresm/yanchun/n1850.ne30_tn14.hybrid.20240829/CLM_DIAG/yrs1to14-obs/

  1. For comparing two new CLM simulations (model1-model2 comparison)
/diag_run -m ctsm -c1 <n1850.ne30_tn14.hybrid.20240829> -s1 1 -e1 14 -c2 n1850.ne30_tn14.hybrid_fatessp.202401007 -s2 1 -e2 14 -i1 /projects/NS9560K-datalake/noresm3/cases -i2 /projects /NS9560K-datalake/noresm3/cases

Sample output: https://ns9560k.web.sigma2.no/datalake/diagnostics/noresm/yanchun/n1850.ne30_tn14.hybrid.20240829/CLM_DIAG/yrs1to14-n1850.ne30_tn14.hybrid_fatessp.202401007/

  1. For comparing new CLM simulation with old CLM (NorESM2 version):

One has to go to the passive mode of diag_run to tweak a little bit by making a change in lnd_template.csh.

./diag_run -m ctsm -c1 <n1850.ne30_tn14.hybrid.20240829> -s1 1 -e1 14 -c2 N1850_f19_tn14_20190621 -s2 1601 -e2 1614 -i1 /projects/NS9560K-datalake/noresm3/cases -i2 /projects/NS9560K/noresm/cases -p

cd /scratch/$USER/diagnostics/noresm/out/CLM_DIAG

sed -i -e 's/^[ ]*setenv[ ]*regrid_2[ ]*1/setenv regrid_2   0/' lnd_template.csh

./lnd_template.csh

Sample output: https://ns9560k.web.sigma2.no/datalake/diagnostics/noresm/yanchun/n1850.ne30_tn14.hybrid.20240829/CLM_DIAG/yrs1to14-N1850_f19_tn14_20190621/

Note, for the CMIP6 version of CLM, the diagnostic only works for some simulations with the monthly averaged field stored in files of each individual months. The script does not work for those with 12-monthly files stored in one single file of a year. NCO has difficulty dealing with these name conventions.