Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
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
77 tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar
79 tar xvpf $DIR_SCRIPTS/$TEMPLATE2.tar
80 mv $TEMPLATE2 $COMPARE
82 # add quote, to be usesd in INPUT_TEXT
83 set MODELQ = \"$MODEL1\"
84 set DIRMQ = \"$DIR_M\"
95 set ENERGYQ = \"$ENERGY\"
96 set DIRSQ = \"$DIR_S\"
97 set DIROQ = \"$DIR_O\"
98 set DIRCQ = \"$DIR_SCRIPTS\"
100 set COMPAREQ = \"$COMPARE\"
101 set MODELN = \"model1\"
103 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"
105 # CLAMP metric processing of model1
106 ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl
107 ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl
108 ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl
110 if ($FILE3 != "") then
111 ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl
114 ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl
115 ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl
116 ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl
117 ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl
119 if ($BGC != "casa") then
120 ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl
122 ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl
125 if ($BGC != "casa") then
126 ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl
129 ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl
130 ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl
132 #*******************************************************
133 # user modification-(3)
137 set DIR_M = /lustre/wolf-ddn/scratch/hof/clamp_data/model/
138 set FILE1 = i01.10casa_1948-2004_ANN_climo.nc
139 set FILE2 = i01.10casa_1948-2004_MONS_climo.nc
140 set FILE3 = f02.03casa_1876-1900_MONS_climo_atm.nc
141 set FILE4 = i01.06casa_1980-2004_ANN_climo.nc
142 set FILE5 = i01.10casa_1990-2004_ANN_climo.nc
143 set FILE6 = i01.07casa_1990-2004_ANN_climo.nc
144 set FILE7 = i01.10casa_Fire_C_1979-2004_monthly.nc
145 set FILE8 = i01.10casa_ameriflux_1990-2004_monthly.nc
149 #*******************************************************
150 # create model2 directory by copying templates
151 if ($FILE3 != "") then
152 set TEMPLATE1 = template_1-model
154 set TEMPLATE1 = template_1-model_noCO2
156 #cp -r $DIR_SCRIPTS/$TEMPLATE1 $MODEL2
158 tar xvpf $DIR_SCRIPTS/$TEMPLATE1.tar
159 mv $TEMPLATE1 $MODEL2
162 # add quote, to be usesd in INPUT_TEXT
163 set MODELQ = \"$MODEL2\"
164 set DIRMQ = \"$DIR_M\"
173 set GRIDQ = \"$GRID\"
175 set ENERGYQ = \"$ENERGY\"
177 set COMPAREQ = \"$COMPARE\"
178 set MODELN = \"model2\"
180 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"
182 # CLAMP metric processing of model2
183 ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl
184 ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl
185 ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl
187 if ($FILE3 != "") then
188 ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl
191 ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl
192 ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl
193 ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl
194 ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl
196 if ($BGC != "casa") then
197 ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl
199 ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl
202 if ($BGC != "casa") then
203 ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl
206 ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl
207 ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl
209 # create a tar file from the final output
210 tar cf - $MODEL1 $MODEL2 $COMPARE > all.tar