2 #-------------------------------------------------------------------
3 # note: user modifies ONLY the "user modification" section
5 # COMPARE: model1 vs model2
7 # DIR_M : directory of model data
8 # DIR_O : directory of observed data
9 # DIR_S : directory of model surface data
10 # DIR_SCRIPTS : directory of run scripts
11 # FILE1 : time_mean climatology from CLM diagnostic package
12 # FILE2 : 12-monthly climatology from CLM diagnostic package
13 # FILE3 : 12-monthly climatology from ATM diagnostic package
14 # leave it blank, if no ATM file:
16 # FILE7 : timeseries file generated from ....
17 # FILE8 : timeseries file generated from ....
18 # GRID : T31, T42, or 1.9
20 # ENERGY : new or old (fields in model data)
21 #-------------------------------------------------------------------
23 #*******************************************************
24 # user modification-(1)
26 # directory name of model comparison
27 #et COMPARE = b30.061n_vs_b30.061m
28 set COMPARE = CN_vs_CASA
30 #*******************************************************
31 # user modification-(2)
35 set DIR_M = /lustre/wolf-ddn/scratch/hof/clamp_data/model/
36 set FILE1 = i01.10cn_1948-2004_ANN_climo.nc
37 set FILE2 = i01.10cn_1948-2004_MONS_climo.nc
38 set FILE3 = f02.03cn_1901-1925_MONS_climo_atm.nc
39 set FILE4 = i01.06cn_1980-2004_ANN_climo.nc
40 set FILE5 = i01.10cn_1990-2004_ANN_climo.nc
41 set FILE6 = i01.07cn_1990-2004_ANN_climo.nc
42 set FILE7 = i01.10cn_Fire_C_1979-2004_monthly.nc
43 set FILE8 = i01.10cn_ameriflux_1990-2004_monthly.nc
48 # in the "CLAMP metric processing" section:
49 # only 00.initial.ncl and 99.final.ncl are required,
50 # user can comment out any one or more of the other ncl scripts,
52 # #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl
55 set DIR_S = /lustre/wolf-ddn/scratch/hof/clamp_data/surface_model/
58 set DIR_O = /lustre/wolf-ddn/scratch/hof/clamp_data/observed/
60 # directory for scripts, templates and ncl files
61 set DIR_SCRIPTS = /lustre/wolf-ddn/scratch/hof/clamp/all/
63 #********************************************************
65 # create model1 and model1_vs_model2 directory by copying templates
66 if ($FILE3 != "") then
67 set TEMPLATE1 = template_1-model
68 set TEMPLATE2 = template_2-model
70 set TEMPLATE1 = template_1-model_noCO2
71 set TEMPLATE2 = template_2-model_noCO2
73 cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL1
74 cp -r $DIR_SCRIPTS/$TEMPLATE2 $COMPARE
76 # add quote, to be usesd in INPUT_TEXT
77 set MODELQ = \"$MODEL1\"
78 set DIRMQ = \"$DIR_M\"
89 set ENERGYQ = \"$ENERGY\"
90 set DIRSQ = \"$DIR_S\"
91 set DIROQ = \"$DIR_O\"
92 set DIRCQ = \"$DIR_SCRIPTS\"
94 set COMPAREQ = \"$COMPARE\"
95 set MODELN = \"model1\"
97 set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ"
99 # CLAMP metric processing of model1
100 ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl
101 ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl
102 ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl
104 if ($FILE3 != "") then
105 ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl
108 ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl
109 ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl
110 ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl
111 ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl
113 if ($BGC != "casa") then
114 ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl
116 ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl
119 if ($BGC != "casa") then
120 ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl
123 ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl
124 ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl
126 #*******************************************************
127 # user modification-(3)
131 set DIR_M = /lustre/wolf-ddn/scratch/hof/clamp_data/model/
132 set FILE1 = i01.10casa_1948-2004_ANN_climo.nc
133 set FILE2 = i01.10casa_1948-2004_MONS_climo.nc
134 set FILE3 = f02.03casa_1876-1900_MONS_climo_atm.nc
135 set FILE4 = i01.06casa_1980-2004_ANN_climo.nc
136 set FILE5 = i01.10casa_1990-2004_ANN_climo.nc
137 set FILE6 = i01.07casa_1990-2004_ANN_climo.nc
138 set FILE7 = i01.10casa_Fire_C_1979-2004_monthly.nc
139 set FILE8 = i01.10casa_ameriflux_1990-2004_monthly.nc
143 #*******************************************************
144 # create model2 directory by copying templates
145 if ($FILE3 != "") then
146 set TEMPLATE1 = template_1-model
148 set TEMPLATE1 = template_1-model_noCO2
150 cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2
152 # add quote, to be usesd in INPUT_TEXT
153 set MODELQ = \"$MODEL2\"
154 set DIRMQ = \"$DIR_M\"
163 set GRIDQ = \"$GRID\"
165 set ENERGYQ = \"$ENERGY\"
167 set COMPAREQ = \"$COMPARE\"
168 set MODELN = \"model2\"
170 set INPUT_TEXT = "model_name=$MODELQ model_grid=$GRIDQ dirm=$DIRMQ film1=$F1 film2=$F2 film3=$F3 film4=$F4 film5=$F5 film6=$F6 film7=$F7 film8=$F8 BGC=$BGCQ ENERGY=$ENERGYQ dirs=$DIRSQ diro=$DIROQ dirscript=$DIRCQ modeln=$MODELN compare=$COMPAREQ"
172 # CLAMP metric processing of model2
173 ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl
174 ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl
175 ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl
177 if ($FILE3 != "") then
178 ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl
181 ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl
182 ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl
183 ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl
184 ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl
186 if ($BGC != "casa") then
187 ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl
189 ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl
192 if ($BGC != "casa") then
193 ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl
196 ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl
197 ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl
199 # create a tar file from the final output
200 tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar