1 | #!/bin/ksh |
---|
2 | #set -vx |
---|
3 | |
---|
4 | #************************************************************** |
---|
5 | # Author: Martial Mancip, Nicolas Vuichard |
---|
6 | # Contact: Nioclas.Vuichard@lsce.jussieu.fr |
---|
7 | # $Date: |
---|
8 | # $Name: OOL_1_9_5 $ |
---|
9 | # $Revision: 1.8 $ |
---|
10 | # History: |
---|
11 | # Modification: Nicolas Vuichard |
---|
12 | # |
---|
13 | #************************************************************** |
---|
14 | |
---|
15 | input=$@ |
---|
16 | paper=-p |
---|
17 | quality=cx1800 |
---|
18 | #cx800 cx1200 |
---|
19 | #frequency=1:12:6 |
---|
20 | echo $input |
---|
21 | #reference_file=RRRRRRR |
---|
22 | #validation directory=VVVVVVV |
---|
23 | debug= |
---|
24 | #-d |
---|
25 | |
---|
26 | # Ratio one day over time step |
---|
27 | one_day=86400 |
---|
28 | ratio=$(( one_day/1800 )) |
---|
29 | |
---|
30 | ssbx=481 |
---|
31 | |
---|
32 | #---------------------- |
---|
33 | |
---|
34 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "PFT distribution" -o pft ORCHIDEE_pft.jnl \ |
---|
35 | "\"PFT distribution\" RRRRRRR inputfile MAXVEGETFRAC" |
---|
36 | |
---|
37 | |
---|
38 | # Smooth over sbx values |
---|
39 | |
---|
40 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Sensible heat flux : diff with obs" -o fluxsens_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
41 | "\"Sensible heat flux : diff with obs\" VVVVVVV RRRRRRR inputfile Fh Qh $FYEAR \"W/m2\" $ssbx" |
---|
42 | |
---|
43 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Latent heat flux : diff with obs" -o fluxlat_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
44 | "\"Latent heat flux : diff with obs\" VVVVVVV RRRRRRR inputfile Fle Qle $FYEAR \"W/m2\" $ssbx" |
---|
45 | |
---|
46 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Surface Temperature : diff with obs" -o tsoil_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
47 | "\"Surface Temperature : diff with obs\" VVVVVVV RRRRRRR inputfile TSOIL (AvgSurfT-273.15) $FYEAR \"degC\" $ssbx " |
---|
48 | |
---|
49 | # slowproc : veget(ji,jv) = veget_max(ji,jv) * ( 1. - exp( - lai(ji,jv) * ext_coef(jv) ) ) |
---|
50 | # => lai = - ln( 1. - veget/veget_max) / ext_coef |
---|
51 | ext_coef=0.5 |
---|
52 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "LAI : lai mean with tsoil/4 obs" -o lai_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
53 | "\"lai : lai mean with tsoil/4\" VVVVVVV RRRRRRR inputfile (tsoil/4) (0.-maxvegetfrac*ln(1.-vegetfrac/maxvegetfrac)/$ext_coef) $FYEAR \"1\" $ssbx " |
---|
54 | |
---|
55 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Potential evapotranspiration : diff with obs" -o epot_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
56 | "\"Potential evapotranspiration : diff with obs\" VVVVVVV RRRRRRR inputfile (ET*${ratio}) (PotEvap*${one_day}) $FYEAR \"mm/d\" $ssbx " |
---|
57 | |
---|
58 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Soil moisture stress : diff with obs" -o humr_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
59 | "\"Soil moisture stress : diff with obs\" VVVVVVV RRRRRRR inputfile RH humrel $FYEAR \"%\" $ssbx " |
---|
60 | |
---|
61 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Soil moisture content 1 : diff with obs" -o humr1_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
62 | "\"Soil moisture content 1 : diff with obs\" VVVVVVV RRRRRRR inputfile SWC humrel $FYEAR \"%\" $ssbx " |
---|
63 | |
---|
64 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "gpp : diff with obs" -o gpp_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
65 | "\"gpp : diff with obs\" VVVVVVV RRRRRRR inputfile ((Acan-Reco)*${ratio}) (GPP*${one_day}) $FYEAR \"gC/m2/day\" $ssbx" |
---|
66 | |
---|
67 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "nee : diff with obs" -o nee_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
68 | "\"nee : diff with obs\" VVVVVVV RRRRRRR inputfile (NEE*${ratio}) (NEE*${one_day}) $FYEAR \"gC/m2/day\" $ssbx" |
---|
69 | |
---|
70 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Ecosystem respiration : diff with obs" -o reco_sbx ORCHIDEE_3sbxdif.jnl \ |
---|
71 | "\"Ecosystem respiration\" VVVVVVV RRRRRRR inputfile (Reco*${ratio}) ((maint_resp+hetero_resp+growth_resp)*${one_day}) $FYEAR \"gC/m2/day\" $ssbx " |
---|
72 | |
---|
73 | |
---|
74 | # Annual cumulative values |
---|
75 | |
---|
76 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Sensible heat flux : Annual diff with obs" -o fluxsens_year ORCHIDEE_3yeardif.jnl \ |
---|
77 | "\"Sensible heat flux : Annual diff with obs\" VVVVVVV RRRRRRR inputfile Fh Qh $FYEAR $DUREE \"W/m2\" ave" |
---|
78 | |
---|
79 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Latent heat flux : Annual diff with obs" -o fluxlat_year ORCHIDEE_3yeardif.jnl \ |
---|
80 | "\"Latent heat flux : Annual diff with obs\" VVVVVVV RRRRRRR inputfile Fle Qle $FYEAR $DUREE \"W/m2\" ave" |
---|
81 | |
---|
82 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Surface Temperature : Annual diff with obs" -o tsoil_year ORCHIDEE_3yeardif.jnl \ |
---|
83 | "\"Surface Temperature : Annual diff with obs\" VVVVVVV RRRRRRR inputfile TSOIL (AvgSurfT-273.15) $FYEAR $DUREE \"degC\" ave" |
---|
84 | |
---|
85 | if [ "${F_FILE}" != "Cabauw" ] && [ "${FLAG}" != "SECHIBA" ]; then |
---|
86 | |
---|
87 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "gpp : Annual diff with obs" -o gpp_year ORCHIDEE_3yeardif.jnl \ |
---|
88 | "\"gpp : Annual diff with obs\" VVVVVVV RRRRRRR inputfile (GPP) (GPP*1800) $FYEAR $DUREE \"gC/m2/an\" sum" |
---|
89 | |
---|
90 | fi |
---|
91 | |
---|
92 | if [ "${F_FILE}" != "Cabauw" ] && [ "${FLAG}" = "OK_STOMATE" ]; then |
---|
93 | |
---|
94 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "nee : Annual diff with obs" -o nee_year ORCHIDEE_3yeardif.jnl \ |
---|
95 | "\"nee : Annual diff with obs\" VVVVVVV RRRRRRR inputfile (NEE) (NEE*1800) $FYEAR $DUREE \"gC/m2/an\" sum" |
---|
96 | |
---|
97 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -p -i "Ecosystem respiration : Annual diff with obs" -o reco_year ORCHIDEE_3yeardif.jnl \ |
---|
98 | "\"Ecosystem respiration : Annual diff with obs\" VVVVVVV RRRRRRR inputfile (Reco) ((maint_resp+hetero_resp+growth_resp)*1800) $FYEAR $DUREE \"gC/m2/an\" sum" |
---|
99 | fi |
---|
100 | |
---|
101 | |
---|
102 | #Â Diurnal cycle |
---|
103 | |
---|
104 | let ANNEE=0 |
---|
105 | while [ $ANNEE -lt $DUREE ]; do |
---|
106 | let ANNEE2=$ANNEE+1 |
---|
107 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "Sensible heat flux : climatologie_${ANNEE2}" -o fluxsens_day ORCHIDEE_12day.jnl \ |
---|
108 | "\"Sensible heat flux\" VVVVVVV RRRRRRR inputfile Fh Qh sloop" |
---|
109 | |
---|
110 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "Latent heat flux : climatologie_${ANNEE2}" -o fluxlat_day ORCHIDEE_12day.jnl \ |
---|
111 | "\"Latent heat flux\" VVVVVVV RRRRRRR inputfile Fle Qle sloop" |
---|
112 | |
---|
113 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "Surface Temperature : climatologie_${ANNEE2}" -o tsoil_day ORCHIDEE_12day.jnl \ |
---|
114 | "\"Surface Temperature\" VVVVVVV RRRRRRR inputfile TSOIL (AvgSurfT-273.15) sloop" |
---|
115 | |
---|
116 | |
---|
117 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "LAI : climatologie_${ANNEE2}" -o lai_day ORCHIDEE_12day.jnl \ |
---|
118 | "\"LAI\" VVVVVVV RRRRRRR inputfile (tsoil/4) (0.-maxvegetfrac*ln(1.-vegetfrac/maxvegetfrac)/$ext_coef) sloop" |
---|
119 | |
---|
120 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "gpp : climatologie_${ANNEE2}" -o gpp_day ORCHIDEE_12day.jnl \ |
---|
121 | "\"GPP\" VVVVVVV RRRRRRR inputfile ((Acan-Reco)*${ratio}) (GPP*${one_day}) sloop" |
---|
122 | |
---|
123 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "nee : climatologie_${ANNEE2}" -o nee_day ORCHIDEE_12day.jnl \ |
---|
124 | "\"nee\" VVVVVVV RRRRRRR inputfile (NEE*${ratio}) (NEE*${one_day}) sloop" |
---|
125 | |
---|
126 | echo $input | ferretloop - ${debug} --ps2gif_option "-g $quality" -s ${ANNEE}:${ANNEE}:1 -p -i "Ecosystem respiration : climatologie_${ANNEE2}" -o reco_day ORCHIDEE_12day.jnl \ |
---|
127 | "\"Ecosystem respiration\" VVVVVVV RRRRRRR inputfile (Reco*${ratio}) ((maint_resp+hetero_resp+growth_resp)*${one_day}) sloop" |
---|
128 | |
---|
129 | let ANNEE=$ANNEE+1 |
---|
130 | done |
---|