forrest@0: #!/bin/csh -f forrest@0: #------------------------------------------------------------------- forrest@0: # note: user modifies ONLY the "user modification" section forrest@0: # forrest@0: # MODEL : model name forrest@0: # DIR_M : directory of model data forrest@0: # DIR_O : directory of observed data forrest@0: # DIR_S : directory of model surface data forrest@0: # DIR_SCRIPTS : directory of run scripts forrest@0: # FILE1 : time_mean climatology from CLM diagnostic package forrest@0: # FILE2 : 12-monthly climatology from CLM diagnostic package forrest@0: # FILE3 : 12-monthly climatology from ATM diagnostic package forrest@0: # leave it blank, if no ATM file: forrest@0: # set FILE3 = forrest@0: # FILE7 : timeseries file generated from .... forrest@0: # FILE8 : timeseries file generated from .... forrest@0: # GRID : T31, T42, or 1.9 forrest@0: # BGC : cn or casa forrest@0: # ENERGY: new or old (model data fields) forrest@0: #******************************************************************** forrest@0: # user modification: forrest@0: forrest@0: # model data (no ATM file) forrest@0: set MODEL = CN forrest@0: set DIR_M = /fis/cgd/cseg/people/jeff/clamp_data/model/ forrest@0: set FILE1 = i01.10cn_1948-2004_ANN_climo.nc forrest@0: set FILE2 = i01.10cn_1948-2004_MONS_climo.nc forrest@0: set FILE3 = forrest@0: set FILE4 = i01.06cn_1980-2004_ANN_climo.nc forrest@0: set FILE5 = i01.10cn_1990-2004_ANN_climo.nc forrest@0: set FILE6 = i01.07cn_1990-2004_ANN_climo.nc forrest@0: set FILE7 = i01.10cn_Fire_C_1979-2004_monthly.nc forrest@0: set FILE8 = i01.10cn_ameriflux_1990-2004_monthly.nc forrest@0: set GRID = T42 forrest@0: set BGC = cn forrest@0: set ENERGY = new forrest@0: forrest@0: # in the "CLAMP metric processing" section: forrest@0: # only 00.initial.ncl and 99.final.ncl are required, forrest@0: # user can comment out any one or more of the other ncl scripts, forrest@0: # e.g. forrest@0: # #ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl forrest@0: forrest@0: # model surface data forrest@0: set DIR_S = /fis/cgd/cseg/people/jeff/clamp_data/surface_model/ forrest@0: forrest@0: # observed data forrest@0: set DIR_O = /fis/cgd/cseg/people/jeff/clamp_data/observed/ forrest@0: forrest@0: # directory for scripts, templates and ncl files forrest@0: set DIR_SCRIPTS = /fis/cgd/cseg/people/jeff/clamp/all/ forrest@0: forrest@0: #******************************************************************** forrest@0: forrest@0: # create a directory for the model by copying from a template forrest@0: if ($FILE3 != "") then forrest@0: set TEMPLATE = template_1-model forrest@0: else forrest@0: set TEMPLATE = template_1-model_noCO2 forrest@0: endif forrest@0: cp -r $DIR_SCRIPTS/$TEMPLATE $MODEL forrest@0: forrest@0: # add quote, to be usesd in INPUT_TEXT forrest@0: set MODELQ = \"$MODEL\" forrest@0: set DIRMQ = \"$DIR_M\" forrest@0: set F1 = \"$FILE1\" forrest@0: set F2 = \"$FILE2\" forrest@0: set F3 = \"$FILE3\" forrest@0: set F4 = \"$FILE4\" forrest@0: set F5 = \"$FILE5\" forrest@0: set F6 = \"$FILE6\" forrest@0: set F7 = \"$FILE7\" forrest@0: set F8 = \"$FILE8\" forrest@0: set GRIDQ = \"$GRID\" forrest@0: set BGCQ = \"$BGC\" forrest@0: set ENERGYQ = \"$ENERGY\" forrest@0: set DIRSQ = \"$DIR_S\" forrest@0: set DIROQ = \"$DIR_O\" forrest@0: forrest@0: 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" forrest@0: forrest@0: # CLAMP metric processing forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/00.initial.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/01.npp.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/02.lai.ncl forrest@0: forrest@0: if ($FILE3 != "") then forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/03.co2.ncl forrest@0: endif forrest@0: forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/04.biomass.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/06.fluxnet.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/07.beta.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/08.turnover.ncl forrest@0: forrest@0: if ($BGC != "casa") then forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/09.carbon_sink.ncl forrest@0: else forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/09x.carbon_sink.ncl forrest@0: endif forrest@0: forrest@0: if ($BGC != "casa") then forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/10.fire.ncl forrest@0: endif forrest@0: forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/11.ameriflux.ncl forrest@0: ncl $INPUT_TEXT $DIR_SCRIPTS/99.final.ncl forrest@0: forrest@0: # create a tar file from the final output forrest@0: tar cf $MODEL.tar $MODEL forrest@0: forrest@0: