Skip to content

Commit 3337626

Browse files
committed
update;
1 parent b1706d0 commit 3337626

File tree

5 files changed

+89
-15
lines changed

5 files changed

+89
-15
lines changed

pcmdi_metrics/variability_mode/param/myParam_demo_NAM.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
# Analysis Options
1414
# -------------------------------------------------
1515
variability_mode = "NAM" # Available domains: NAM, NAO, SAM, PNA, PDO
16-
seasons = ["DJF"] # Available seasons: DJF, MAM, JJA, SON, monthly, yearly
16+
seasons = ["DJF", "MAM", "JJA", "SON"] # Available seasons: DJF, MAM, JJA, SON, monthly, yearly
1717

1818
ConvEOF = True # Calculate conventioanl EOF for model
1919
CBF = True # Calculate Common Basis Function (CBF) for model
2020

2121
# =================================================
2222
# Miscellaneous
2323
# -------------------------------------------------
24-
update_json = True # False
25-
debug = True # False
24+
update_json = False
25+
debug = False
2626

2727
# =================================================
2828
# Observation
@@ -81,5 +81,11 @@
8181
"%(reference_data_name)",
8282
)
8383

84-
nc_out = True # Write output in NetCDF
85-
plot = True # Create map graphics
84+
# Output for obs
85+
plot_obs = True # Create map graphics
86+
nc_out_obs = True # Write output in NetCDF
87+
88+
# Output for models
89+
nc_out = True
90+
plot = True
91+

pcmdi_metrics/variability_mode/param/myParam_demo_PDO.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
# =================================================
2424
# Miscellaneous
2525
# -------------------------------------------------
26-
update_json = True # False
27-
debug = True # False
26+
update_json = False # False
27+
debug = False # False
2828

2929
# =================================================
3030
# Observation
@@ -88,5 +88,10 @@
8888
"%(reference_data_name)",
8989
)
9090

91-
nc_out = True # Write output in NetCDF
92-
plot = True # Create map graphics
91+
# Output for obs
92+
plot_obs = True # Create map graphics
93+
nc_out_obs = True # Write output in NetCDF
94+
95+
# Output for models
96+
nc_out = True
97+
plot = True

pcmdi_metrics/variability_mode/scripts_pcmdi/run_all_modes_mips.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/sh
22
set -ax
33

4-
# Working conda env
5-
# - Crunchy: pmp_nightly_20181128, pmp_nightly_20190617
6-
# - Grim: pmp_nightly_20190522
7-
84
ver=`date +"%Y%m%d"`
95
mips='cmip3 cmip5 cmip6'
106
mips='cmip6'

pcmdi_metrics/variability_mode/scripts_pcmdi/run_pmp_parallel.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ modnames='all'
2929

3030
realization='all'
3131

32-
param_dir='../../../sample_setups/pcmdi_parameter_files/variability_modes'
32+
num_workers=5
33+
34+
#param_dir='../../../sample_setups/pcmdi_parameter_files/variability_modes'
3335
#param_dir='../../../sample_setups/pcmdi_parameter_files/variability_modes/alternative_obs'
36+
param_dir='../param'
3437

3538
for mip in $mips; do
3639
echo $mip
@@ -48,8 +51,15 @@ for mip in $mips; do
4851
mkdir -p ./log/$mip/$exp/$case_id
4952
# Run
5053
for mode in $modes_list; do
54+
55+
if [ $mode == 'PDO' ] || [ $mode == 'NPGO' ] || [ $mode == 'AMO' ]; then
56+
mode_o='PDO'
57+
else
58+
mode_o='NAM'
59+
fi
60+
5161
echo $mip $exp $mode $case_id
52-
python ./parallel_driver.py -p ${param_dir}/myParam_${mode}_${mip}.py --param_dir $param_dir --mip $mip --exp $exp --case_id $case_id --modnames $modnames --realization $realization --variability_mode $mode >& ./log/$mip/$exp/$case_id/log.${mip}.${exp}.${mode}.all.v${ver}.txt &
62+
python ./parallel_driver.py -p ${param_dir}/myParam_${mode_o}_${mip}.py --param_dir $param_dir --mip $mip --exp $exp --case_id $case_id --modnames $modnames --realization $realization --variability_mode $mode --num_workers $num_workers >& ./log/$mip/$exp/$case_id/log.${mip}.${exp}.${mode}.all.v${ver}.txt &
5363
disown
5464
sleep 1
5565
done
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/sh
2+
set -a
3+
4+
# To avoid below error
5+
# OpenBLAS blas_thread_init: pthread_create failed for thread XX of 96: Resource temporarily unavailable
6+
export OMP_NUM_THREADS=1
7+
8+
# Working conda env in gates: cdat82_20191107_py27
9+
10+
ver=`date +"%Y%m%d-%H%M"`
11+
case_id="v"`date +"%Y%m%d"`
12+
13+
#mips='cmip3 cmip5 cmip6'
14+
#mips='cmip5 cmip6'
15+
#mips='cmip5'
16+
mips='cmip6'
17+
#mips='cmip3'
18+
19+
#exps='20c3m amip'
20+
#exps='20c3m'
21+
#exps='historical amip'
22+
exps='historical'
23+
#exps='amip'
24+
25+
#modes='all'
26+
modes='NAO NPO PNA'
27+
28+
modnames='all'
29+
30+
realization='all'
31+
32+
param_dir='../../../sample_setups/pcmdi_parameter_files/variability_modes'
33+
#param_dir='../../../sample_setups/pcmdi_parameter_files/variability_modes/alternative_obs'
34+
35+
for mip in $mips; do
36+
echo $mip
37+
for exp in $exps; do
38+
if [ $modes == 'all' ]; then
39+
if [ $exp == 'historical' ] || [ $exp == '20c3m' ]; then
40+
modes_list='NAM NAO PNA SAM PDO NPO NPGO'
41+
elif [ $exp == 'amip' ]; then
42+
modes_list='NAM NAO PNA SAM NPO'
43+
fi
44+
else
45+
modes_list=$modes
46+
fi
47+
# Log dir
48+
mkdir -p ./log/$mip/$exp/$case_id
49+
# Run
50+
for mode in $modes_list; do
51+
echo $mip $exp $mode $case_id
52+
python ./parallel_driver.py -p ${param_dir}/myParam_${mode}_${mip}.py --param_dir $param_dir --mip $mip --exp $exp --case_id $case_id --modnames $modnames --realization $realization --variability_mode $mode >& ./log/$mip/$exp/$case_id/log.${mip}.${exp}.${mode}.all.v${ver}.txt &
53+
disown
54+
sleep 1
55+
done
56+
done
57+
done

0 commit comments

Comments
 (0)