Skip to content

Commit ea76241

Browse files
committed
Standalone zi testing
1 parent d2a5982 commit ea76241

File tree

2 files changed

+139
-2
lines changed

2 files changed

+139
-2
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Modify this cfg to generate the necessary data for stand-alone tests of zppy-interfaces
2+
# 1. Update <output>, <www>, <environment_commands_secondary> below.
3+
# 2. Run with `zppy -c examples/post.v3.LR.amip.0101.zi_setup.cfg`.
4+
# 3. Once the jobs finish, `cd <output>/post/scripts`.
5+
# 4. Run `grep -n "About to run:" pcmdi_diags*.o*` to find the pcmdi_diags commands.
6+
# 5. Then, you can run those lines stand-alone.
7+
[default]
8+
input = /lcrc/group/e3sm2/ac.wlin/E3SMv3/AMIP/v3.LR.amip_0101
9+
output = /lcrc/group/e3sm/ac.forsyth2/zi_pcmdi_stand_alone_setup/unique_id_1/v3.LR.amip_0101
10+
www = /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/zi_pcmdi_stand_alone_setup/unique_id_1
11+
campaign = "water_cycle"
12+
case = v3.LR.amip_0101
13+
debug = False
14+
environment_commands = "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh"
15+
partition = debug #compute
16+
17+
[ts]
18+
active = True
19+
walltime = "00:10:00"
20+
years = "2005:2015:5"
21+
22+
[[ atm_monthly_180x360_aave ]]
23+
input_subdir = "archive/atm/hist"
24+
input_files = "eam.h0"
25+
frequency = "monthly"
26+
mapping_file = /home/ac.zender/data/maps/map_ne30pg2_to_cmip6_180x360_aave.20200201.nc
27+
# list for pcmdi diag, note: PHIS,hyam,hybm,hyai,hybi need to be included to process the 3D fields
28+
vars = "ICEFRAC,LANDFRAC,OCNFRAC,PSL,FSNTC,FSNTOAC,SWCF,LWCF,FLUT,FSNT,FSNTOA,FLNT,FLNTC,FSNS,FLNS,FSNS,SHFLX,QFLX,LHFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,U10,QREFHT,TMQ,CLDTOT,CLDHGH,CLDMED,CLDLOW,FLDS,FSDS,TGCLDIWP,TGCLDCWP,TGCLDLWP,FLNSC,FLUTC,FSDSC,SOLIN,FSNSC,AODABS,AODVIS,AODDUST,AREL,TREFMNAV,TREFMXAV,PS,PHIS,U,V,T,Z3"
29+
30+
[e3sm_to_cmip]
31+
active = True
32+
frequency = "monthly"
33+
ts_grid = "180x360_aave"
34+
ts_num_years=5
35+
walltime = "00:10:00"
36+
years = "2005:2015:5"
37+
38+
[[ atm_monthly_180x360_aave ]]
39+
# list of variables to be interpolated to pressure level; see e3sm_to_cmip/vrt_remap_plev19.nc
40+
# This defaults to cmip_plevdata = string(default="inclusions/e3sm_to_cmip/vrt_remap_plev19.nc")
41+
# cmip_plevdata = /lcrc/group/e3sm/ac.szhang/acme_scratch/e3sm_project/zppy/zppy/templates/inclusions/e3sm_to_cmip/vrt_remap_plev19.nc
42+
input_files = "eam.h0"
43+
interp_vars = "U,V,T,Z3"
44+
ts_subsection = "atm_monthly_180x360_aave"
45+
vars = "ICEFRAC,LANDFRAC,OCNFRAC,PSL,FSNTC,FSNTOAC,SWCF,LWCF,FLUT,FSNT,FSNTOA,FLNT,FLNTC,FSNS,FLNS,FSNS,SHFLX,QFLX,LHFLX,TAUX,TAUY,PRECC,PRECL,PRECSC,PRECSL,TS,TREFHT,U10,QREFHT,TMQ,CLDTOT,CLDHGH,CLDMED,CLDLOW,FLDS,FSDS,TGCLDIWP,TGCLDCWP,TGCLDLWP,FLNSC,FLUTC,FSDSC,SOLIN,FSNSC,AODABS,AODVIS,AODDUST,AREL,TREFMNAV,TREFMXAV,PS,PHIS,U,V,T,Z3"
46+
47+
[pcmdi_diags]
48+
active = True
49+
environment_commands = "source /lcrc/soft/climate/e3sm-unified/load_latest_e3sm_unified_chrysalis.sh"
50+
environment_commands_secondary = "source /gpfs/fs1/home/ac.forsyth2/miniforge3/etc/profile.d/conda.sh; conda activate zi-pcmdi-diags-20250930"
51+
nodes = 1
52+
walltime = "4:00:00"
53+
figure_format = "png"
54+
run_type = "model_vs_obs"
55+
# Create rules to construct cmip-like datasets with a string constructed as
56+
# "mip.exp.product.realization", where "."is used as the delimiter (mandatory)
57+
model_name = 'e3sm.amip.v3-LR.0101'
58+
model_tableID = 'Amon'
59+
multiprocessing = True
60+
num_workers = 24
61+
# Observational data
62+
obs_ts = '/lcrc/soft/climate/e3sm_diags_data/obs_for_e3sm_diags/time-series'
63+
pcmdi_debug = False
64+
ts_years = "2005-2014",
65+
66+
[[ mean_climate ]]
67+
active = True
68+
# Default for all variables or specify source for each variable separately.
69+
obs_sets = "default"
70+
ref_final_yr = 2018
71+
ref_start_yr = 1979
72+
ref_years = "2005-2014",
73+
# Variables in current pcmdi-cmip list
74+
# rltcre and rstcre are derived variables as they are not included in cmip_ts
75+
vars = "pr,prw,psl,rlds,rldscs,rltcre,rstcre,rsus,rsuscs,rlus,rlut,rlutcs,rsds,rsdscs,rsdt,rsut,rsutcs,rtmt,sfcWind,tas,tauu,tauv,ts,ta-200,ta-850,ua-200,ua-850,va-200,va-850,zg-500"
76+
# See zppy/templates/pcmdi_diags/regions_specs.json for options of all regions
77+
# Below is default setup for global/regional mean climate metrics
78+
regions = "global,ocean,land,NHEX,SHEX,TROPICS"
79+
target_grid = "2.5x2.5"
80+
target_grid_string = "2p5x2p5"
81+
82+
[[ variability_modes_cpl ]]
83+
active = True
84+
# See zppy/templates/pcmdi_diags/reference_alias.json for options
85+
obs_sets = "alternate1" #"default"
86+
ref_final_yr = 2019
87+
ref_start_yr = 1870
88+
ref_years = "2005-2014",
89+
vars = "ts"
90+
# Name of modes varibility
91+
cpl_modes = "PDO,NPGO,AMO"
92+
frequency = 'mo'
93+
landmask = True
94+
ModUnitsAdjust = '(True,"subtract",273.15)'
95+
ObsUnitsAdjust = '(True,"subtract",273.15)'
96+
seasons = "yearly,monthly"
97+
98+
[[ variability_modes_atm ]]
99+
active = True
100+
# See zppy/templates/pcmdi_diags/reference_alias.json for options
101+
# Default for all variables
102+
obs_sets = "alternate2" # "default"
103+
ref_final_yr = 2015
104+
ref_start_yr = 1853
105+
ref_years = "2005-2014",
106+
vars = "psl"
107+
# Varibility modes
108+
atm_modes = "NAM,NAO,PNA,NPO,SAM,PSA1,PSA2"
109+
frequency = 'mo'
110+
landmask = False
111+
ModUnitsAdjust = '(True,"divide",100.0)'
112+
ObsUnitsAdjust = '(True,"divide",100.0)'
113+
seasons = "DJF,MAM,JJA,SON,yearly,monthly"
114+
115+
[[ enso ]]
116+
active = False
117+
# For enso, the obs_sets is explicitely set for each variable to ensure that
118+
# they are from the same source, below are setup to used ERA5 reanalysis.
119+
obs_sets = "default,alternate2,default,default,default,default,default,default,default,alternate2,alternate2,alternate2,alternate2,alternate2"
120+
ref_final_yr = 2018
121+
ref_start_yr = 1979
122+
ref_years = "2005-2014",
123+
vars = "psl,pr,prsn,ts,tas,tauu,tauv,hfls,hfss,rlds,rsds,rlus,rlut,rsdt"
124+
# See zppy/templates/pcmdi_diags/reference_alias.json for options
125+
enso_groups = "ENSO_perf,ENSO_proc,ENSO_tel"
126+
127+
[[ synthetic_plots ]]
128+
active = True
129+
# clim_period, emov_period, enso_period:
130+
figure_sets_period = "2005-2014,2005-2014,2005-2014"
131+
# Location: /lcrc/group/e3sm/diagnostics/pcmdi_data/metrics_data/mean_climate/cmip6/amip
132+
cmip_clim_set = "cmip6.amip.v20250702"
133+
# Location: /lcrc/group/e3sm/diagnostics/pcmdi_data/metrics_data/variability_modes/cmip6/amip
134+
cmip_movs_set = "cmip6.amip.v20210119"
135+
# Location: /lcrc/group/e3sm/diagnostics/pcmdi_data/metrics_data/enso_metric/cmip6/historical
136+
# There is no enso metric for CMIP6 AMIP, so use historical instead
137+
cmip_enso_set = "cmip6.historical.v20210620"

zppy/templates/pcmdi_diags.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ echo "Linking observational data into ${obstmp_dir}..."
500500
echo "Linking observational data using SLURM..."
501501

502502
command="zi-pcmdi-link-observation --model_name_ref ${model_name_ref} --tableID_ref ${tableID_ref} --vars={{ vars }} --obs_sets {{ obs_sets }} --obs_ts {{ obs_ts }} --obstmp_dir ${obstmp_dir}"
503-
echo "Running: ${command}"
503+
echo "Running a zi-pcmdi command: ${command}"
504504

505505
{{ environment_commands_secondary }}
506506
time eval "${command}"
@@ -854,7 +854,7 @@ command="zi-pcmdi-synthetic-plots --synthetic_sets {{ synthetic_sets }} --figure
854854

855855
# Run diagnostics
856856
{{ environment_commands_secondary }}
857-
echo "About to run a zi-pcmdi command"
857+
echo "Running a zi-pcmdi command: ${command}"
858858
echo "The current directory is: $PWD" # This will be of the form .../post/scripts/tmpDir
859859
time ${command}
860860
if [ $? != 0 ]; then

0 commit comments

Comments
 (0)