1 | #!/bin/bash |
---|
2 | # L. Fita, June 2016. Generic script to plot model outputs |
---|
3 | |
---|
4 | main='model_graphics.bash' |
---|
5 | errormsg='ERROR -- error -- ERROR -- error' |
---|
6 | warnmsg='ERROR -- error -- ERROR -- error' |
---|
7 | |
---|
8 | function uploadvars() { |
---|
9 | # Function to upload variables to the system from an ASCII file as: |
---|
10 | # [varname] = [value] |
---|
11 | fileval=$1 |
---|
12 | errormsg='ERROR -- error -- ERROR -- error' |
---|
13 | |
---|
14 | if test ! -f ${fileval}; then |
---|
15 | echo ${errormsg} |
---|
16 | echo " "${fname}": file '"${fileval}"' does not exist!!" |
---|
17 | exit |
---|
18 | fi |
---|
19 | |
---|
20 | Nlin=`wc -l ${fileval} | awk '{print $1}'` |
---|
21 | |
---|
22 | ilin=1 |
---|
23 | while test ${ilin} -le ${Nlin}; do |
---|
24 | line=`head -n ${ilin} ${fileval} | tail -n 1` |
---|
25 | varname=`echo ${line} | tr '=' ' ' | awk '{print $1}'` |
---|
26 | value=`echo ${line} | tr '=' ' ' | awk '{print $2}'` |
---|
27 | Lvarname=`expr length ${varname}'0'` |
---|
28 | |
---|
29 | if test ${Lvarname} -gt 1 && test ! ${varname:0:1} = '#'; then |
---|
30 | export ${varname}=${value} |
---|
31 | fi |
---|
32 | ilin=`expr ${ilin} + 1` |
---|
33 | done |
---|
34 | } |
---|
35 | |
---|
36 | function isin_list() { |
---|
37 | # Function to check whether a value is in a list |
---|
38 | list=$1 |
---|
39 | value=$2 |
---|
40 | |
---|
41 | is=`echo ${list} | tr ':' '\n' | awk '{print "@"$1"@"}' | grep '@'${value}'@' | wc -w` |
---|
42 | if test ${is} -eq 1 |
---|
43 | then |
---|
44 | true |
---|
45 | else |
---|
46 | false |
---|
47 | fi |
---|
48 | } |
---|
49 | |
---|
50 | ####### ####### |
---|
51 | ## MAIN |
---|
52 | ####### |
---|
53 | |
---|
54 | # Uploading environment |
---|
55 | uploadvars model_graphics.dat |
---|
56 | |
---|
57 | export |
---|
58 | exit |
---|
59 | |
---|
60 | |
---|
61 | timeval='tstep' |
---|
62 | zval='null' |
---|
63 | dimval='lon,lat,pressure,time' |
---|
64 | |
---|
65 | compute=0 |
---|
66 | computetlon=false |
---|
67 | plot=false |
---|
68 | single2Dplot=false |
---|
69 | lonZsec=false |
---|
70 | differences=true |
---|
71 | |
---|
72 | combosfile=${HOMEpy}/diagnostics.inf |
---|
73 | |
---|
74 | errmsg='ERROR -- error -- ERROR -- error' |
---|
75 | ####### ###### ##### #### ### ## # |
---|
76 | |
---|
77 | exps=`echo ${experiments} | tr ':' ' '` |
---|
78 | varks=`echo ${varkinds} | tr ':' ' '` |
---|
79 | |
---|
80 | istep=0 |
---|
81 | |
---|
82 | if test ${compute} -eq 1; then |
---|
83 | for exp in ${exps}; do |
---|
84 | echo "exp: "${exp} |
---|
85 | if test ${exp} == 'AR40'; then |
---|
86 | var2Dtmeans=${var2Dtmeans_AR40} |
---|
87 | else |
---|
88 | var2Dtmeans=${var2Dtmeans_NPv31} |
---|
89 | fi |
---|
90 | for vark in ${varks}; do |
---|
91 | echo " vark: "${vark} |
---|
92 | |
---|
93 | if test ${vark} = 'mean'; then |
---|
94 | fileorig=${ifoldmean}/${exp}/${filenmean} |
---|
95 | if test ! -f ${fileorig}; then |
---|
96 | fileworig=${filensfc} |
---|
97 | dvals='T:Time,Z:bottom_top,Y:south_north,X:west_east' |
---|
98 | dimnames='T:Time,Z:bottom_top,Y:south_north,X:west_east' |
---|
99 | python ${HOMEpy}/vertical_interpolation.py \ |
---|
100 | -f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin' \ |
---|
101 | -v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG |
---|
102 | if test $? -ne 0; then |
---|
103 | echo ${errormsg} |
---|
104 | echo " python failed!" |
---|
105 | echo " python ${HOMEpy}/vertical_interpolation.py" \ |
---|
106 | "-f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin'" \ |
---|
107 | "-v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG" |
---|
108 | rm ${ofold}/${exp}/vertical_interpolation_WRFp.nc >& /dev/null |
---|
109 | exit |
---|
110 | fi |
---|
111 | mv vertical_interpolation_WRFp.nc ${ofold}/${exp} |
---|
112 | fi |
---|
113 | vars=`echo ${mean_variables} | tr ':' ' '` |
---|
114 | ofile='mean_variables' |
---|
115 | elif test ${vark} = 'sfc'; then |
---|
116 | fileorig=${ifoldsfc}/${exp}/${filensfc} |
---|
117 | if test ! -f ${fileorig}; then |
---|
118 | fileworig=${filensfc} |
---|
119 | cp ${ifoldsfc}/${exp}/${fileworig} ${ifoldsfc}/${exp}/${filensfc} |
---|
120 | python ${HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f ${ifoldsfc}/${exp}/${filensfc} \ |
---|
121 | -S 19491201000000,hours -v time |
---|
122 | python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f ${ifoldsfc}/${exp}/${filensfc}\ |
---|
123 | -S longitude,latitude -v XLONG,XLAT |
---|
124 | fi |
---|
125 | if test ${exp} = 'AR40'; then |
---|
126 | vars=`echo ${sfc_variables_AR40} | tr ':' ' '` |
---|
127 | else |
---|
128 | vars=`echo ${sfc_variables_NPv31} | tr ':' ' '` |
---|
129 | fi |
---|
130 | ofile='sfc_variables' |
---|
131 | elif test ${vark} = 'diag'; then |
---|
132 | fileorig=${ifolddiag}/${exp}/${filendiag} |
---|
133 | vars=`echo ${diag_variables} | tr ':' ' '` |
---|
134 | if test ! -f ${fileorig}; then |
---|
135 | values='Time@XTIME,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
136 | ivar=0 |
---|
137 | varcombos='' |
---|
138 | for var in ${vars}; do |
---|
139 | echo " var:"${var} |
---|
140 | varn=`echo ${var} | tr '_' ' ' | awk '{print $2}'` |
---|
141 | combo=`python ${HOMEpy}/diagnostics.py -f ${combosfile} -d variable_combo -v ${varn}\ |
---|
142 | | grep COMBO | awk '{print $2}'` |
---|
143 | if test ${combo} = 'ERROR'; then |
---|
144 | echo ${errormsg} |
---|
145 | echo " No variable '"${varn}"' in '"${combosfile}"' !!" |
---|
146 | exit |
---|
147 | fi |
---|
148 | if test ${ivar} -eq 0; then |
---|
149 | varcombos=${varn}'|'${combo} |
---|
150 | else |
---|
151 | varcombos=${varcombos}','${varn}'|'${combo} |
---|
152 | fi |
---|
153 | ivar=`expr ${ivar} + 1` |
---|
154 | done |
---|
155 | python ${HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc} -v \ |
---|
156 | ${varcombos} |
---|
157 | if test $? -ne 0; then |
---|
158 | echo ${errormsg} |
---|
159 | echo " python failed!!" |
---|
160 | echo python ${HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc}\ |
---|
161 | -v ${varcombos} |
---|
162 | exit |
---|
163 | fi |
---|
164 | python ${HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f diagnostics.nc \ |
---|
165 | -S 19491201000000,hours -v time |
---|
166 | python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f diagnostics.nc \ |
---|
167 | -S longitude,latitude -v XLONG,XLAT |
---|
168 | mv diagnostics.nc ${ifolddiag}/${exp} |
---|
169 | fi |
---|
170 | ofile='diag_variables' |
---|
171 | elif test ${vark} = 'z'; then |
---|
172 | fileorig=${ifoldmean}/${exp}/${filenmean} |
---|
173 | vars=`echo ${z_variables} | tr ':' ' '` |
---|
174 | ofile='z_variables' |
---|
175 | fi |
---|
176 | |
---|
177 | # Averaging |
---|
178 | ## |
---|
179 | echo " averaging..." |
---|
180 | ivar=0 |
---|
181 | for varn in ${vars}; do |
---|
182 | file=${fileorig} |
---|
183 | echo " var: "${varn} |
---|
184 | var=`echo ${varn} | tr '|' ' ' | awk '{print $2}'` |
---|
185 | varval=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'` |
---|
186 | varname=`echo ${varval} | tr ',' ' ' | awk '{print $1}'` |
---|
187 | |
---|
188 | echo " std name: "${varname} |
---|
189 | varhead=`echo ${varname} | tr '_' ' ' | awk '{print $1}'` |
---|
190 | vartail=`echo ${varname} | tr '_' ' ' | awk '{print $2}'` |
---|
191 | |
---|
192 | if test ${vark} = 'mean'; then |
---|
193 | vals='time:-1|z:-1|y:-1|x:-1,time:x,mean,pressure:lat' |
---|
194 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} |
---|
195 | pyexec=$? |
---|
196 | if test ${pyexec} -ne 0; then |
---|
197 | echo ${errormsg} |
---|
198 | echo " "${main}": python fai1ls!" |
---|
199 | echo "python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}" |
---|
200 | exit |
---|
201 | else |
---|
202 | oper=`echo ${vals} | tr ',' ' ' | awk '{print $3}'` |
---|
203 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${varname}${oper}.nc |
---|
204 | fi |
---|
205 | elif test ${vark} = 'z'; then |
---|
206 | vals='time:-1|z:-1|y:-1|x:-1,time:x,mean,pressure:lat' |
---|
207 | echo "NOT FINISHED!!!!" |
---|
208 | exit |
---|
209 | else |
---|
210 | vals='Time:-1|south_north:-1|west_east:-1,west_east,mean,time:XLAT' |
---|
211 | if test ${var} = 'ACRAINTOT'; then |
---|
212 | files='add|'${file}'|RAINC,add|'${file}'|RAINNC' |
---|
213 | python ${HOMEpy}/nc_var.py -S 'time|XLAT|XLONG@'${files} -o compute_opersvarsfiles \ |
---|
214 | -v ${var} |
---|
215 | mv opersvarsfiles_${var}.nc ${ofold}/${exp} |
---|
216 | file=${ofold}/${exp}/opersvarsfiles_${var}.nc |
---|
217 | elif test ${var} = 'RAINTOT'; then |
---|
218 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
219 | python ${HOMEpy}/diagnostics.py -d ${dims} -v 'RAINTOT|RAINC@RAINNC@time' -f ${file} |
---|
220 | mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc |
---|
221 | file=${ofold}/${exp}/diagnostics_${varname}.nc |
---|
222 | var='pr' |
---|
223 | elif test ${var} = 'cllmh'; then |
---|
224 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
225 | clouds='cll:clm:clh' |
---|
226 | cls=`echo ${clouds} | tr ':' ' '` |
---|
227 | for cl in ${cls}; do |
---|
228 | file=${ofold}/${exp}/diagnostics.nc |
---|
229 | var=${cl} |
---|
230 | echo " var: "${var} |
---|
231 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} |
---|
232 | pyexec=$? |
---|
233 | if test ${pyexec} -ne 0; then |
---|
234 | echo ${errormsg} |
---|
235 | echo " "${main}": python fails!" |
---|
236 | echo python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} |
---|
237 | exit |
---|
238 | fi |
---|
239 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${cl}${oper}.nc |
---|
240 | vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' |
---|
241 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
242 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} |
---|
243 | pyexec=$? |
---|
244 | if test ${pyexec} -ne 0; then |
---|
245 | echo ${errormsg} |
---|
246 | echo " "${main}": python fails!" |
---|
247 | exit |
---|
248 | else |
---|
249 | oper=`echo ${vals} | tr ',' ' ' | awk '{print $3}'` |
---|
250 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${cl}t${oper}.nc |
---|
251 | fi |
---|
252 | done |
---|
253 | # break |
---|
254 | elif test ${var} = 'WRFbils' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then |
---|
255 | dims='Time@time,south_north@XLAT,west_east@XLONG' |
---|
256 | python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFbils|HFX@LH' -f ${file} |
---|
257 | mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc |
---|
258 | file=${ofold}/${exp}/diagnostics_${varname}.nc |
---|
259 | var='bils' |
---|
260 | elif test ${var} = 'WRFprw' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then |
---|
261 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
262 | python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFprw|WRFdens@QVAPOR' -f ${file} |
---|
263 | mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc |
---|
264 | file=${ofold}/${exp}/diagnostics_${varname}.nc |
---|
265 | var='prw' |
---|
266 | elif test ${var} = 'WRFrhs' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then |
---|
267 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
268 | python ${HOMEpy}/diagnostics.py -d ${dims} -v 'WRFrhs|PSFC@T2@Q2' -f ${file} |
---|
269 | mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc |
---|
270 | file=${ofold}/${exp}/diagnostics_${varname}.nc |
---|
271 | var='huss' |
---|
272 | elif test ${var} = 'WRFprc'; then |
---|
273 | vals='Time:-1|south_north:-1|west_east:-1,west_east,mean,time:XLAT' |
---|
274 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
275 | var='prc' |
---|
276 | elif test ${var} = 'WRFprls'; then |
---|
277 | vals='Time:-1|south_north:-1|west_east:-1,west_east,mean,time:XLAT' |
---|
278 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
279 | var='prls' |
---|
280 | fi |
---|
281 | if test ! -f ${ofold}/${exp}/${varname}${oper}.nc; then |
---|
282 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} |
---|
283 | pyexec=$? |
---|
284 | if test ${pyexec} -ne 0; then |
---|
285 | echo ${errormsg} |
---|
286 | echo " "${main}": python fails!" |
---|
287 | exit |
---|
288 | else |
---|
289 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${varname}${oper}.nc |
---|
290 | fi |
---|
291 | fi |
---|
292 | fi |
---|
293 | echo "HereLluis"${var} |
---|
294 | # Time means |
---|
295 | if $(isin_list ${var2Dtmeans} ${var}); then |
---|
296 | echo "Computing time means!!" |
---|
297 | if test ${var} = 'cllmh'; then |
---|
298 | clouds='cll:clm:clh' |
---|
299 | clds=`echo ${clouds} | tr ':' ' '` |
---|
300 | for cld in ${clds}; do |
---|
301 | vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' |
---|
302 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
303 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cld} |
---|
304 | pyexec=$? |
---|
305 | if test ${pyexec} -ne 0; then |
---|
306 | echo ${errormsg} |
---|
307 | echo " "${main}": python fails!" |
---|
308 | exit |
---|
309 | else |
---|
310 | oper=`echo ${vals} | tr ',' ' ' | awk '{print $3}'` |
---|
311 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${cld}t${oper}.nc |
---|
312 | fi |
---|
313 | done |
---|
314 | else |
---|
315 | vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' |
---|
316 | dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' |
---|
317 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} |
---|
318 | pyexec=$? |
---|
319 | if test ${pyexec} -ne 0; then |
---|
320 | echo ${errormsg} |
---|
321 | echo " "${main}": python fails!" |
---|
322 | exit |
---|
323 | else |
---|
324 | oper=`echo ${vals} | tr ',' ' ' | awk '{print $3}'` |
---|
325 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${varname}t${oper}.nc |
---|
326 | fi |
---|
327 | fi |
---|
328 | fi |
---|
329 | if test ${var} = 'cllmh'; then exit; fi |
---|
330 | ivar=`expr ${ivar} + 1` |
---|
331 | # exit |
---|
332 | # end of vars |
---|
333 | done |
---|
334 | |
---|
335 | # end of kind vars |
---|
336 | done |
---|
337 | |
---|
338 | done |
---|
339 | # end of compute |
---|
340 | fi |
---|
341 | # Longitudinal means of tmeans |
---|
342 | ## |
---|
343 | if ${computetlon}; then |
---|
344 | echo "Computing Longitudinal means of temporal means..." |
---|
345 | for exp in ${exps}; do |
---|
346 | echo " exp:"${exp} |
---|
347 | for tmean in ${ofold}/${exp}/*tmean.nc; do |
---|
348 | fname=`basename ${tmean}` |
---|
349 | var=`ncdump -h ${tmean} | grep float | grep mean | tr '(' ' ' | awk '{print $2}'` |
---|
350 | vals='south_north:-1|west_east:-1,west_east,mean,XLAT' |
---|
351 | dims='bottom_top@bottom_top,south_north@south_north,west_east@west_east' |
---|
352 | if test ! -f ${ofold}/${exp}/${var}t-lonmean.nc; then |
---|
353 | python ${HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${tmean} -v ${var} |
---|
354 | pyexec=$? |
---|
355 | if test ${pyexec} -ne 0; then |
---|
356 | echo ${errormsg} |
---|
357 | echo " "${main}": python fails!" |
---|
358 | exit |
---|
359 | else |
---|
360 | mv file_oper_alongdims_mean.nc ${ofold}/${exp}/${var}t-lonmean.nc |
---|
361 | fi |
---|
362 | # exit |
---|
363 | fi |
---|
364 | done |
---|
365 | |
---|
366 | done |
---|
367 | fi |
---|
368 | |
---|
369 | if ${plot}; then |
---|
370 | # Plots |
---|
371 | ## |
---|
372 | |
---|
373 | for exp in ${exps}; do |
---|
374 | echo "exp: "${exp} |
---|
375 | for vark in ${varks}; do |
---|
376 | echo " vark: "${vark} |
---|
377 | if test ${vark} = 'mean'; then |
---|
378 | gcoups=`echo ${graph_couples_mean} | tr ':' ' '` |
---|
379 | elif test ${vark} = 'sfc'; then |
---|
380 | if test ${exp} = 'AR40'; then |
---|
381 | gcoups=`echo ${graph_couples_sfc_AR40} | tr ':' ' '` |
---|
382 | else |
---|
383 | gcoups=`echo ${graph_couples_sfc_NPv31} | tr ':' ' '` |
---|
384 | fi |
---|
385 | elif test ${vark} = 'diag'; then |
---|
386 | gcoups=`echo ${graph_couples_diag} | tr ':' ' '` |
---|
387 | fi |
---|
388 | |
---|
389 | for gpair in ${gcoups}; do |
---|
390 | shdvar=`echo ${gpair} | tr '@' ' ' | awk '{print $1}'` |
---|
391 | cntvar=`echo ${gpair} | tr '@' ' ' | awk '{print $2}'` |
---|
392 | echo " couple: "${shdvar}'-'${cntvar} |
---|
393 | shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'` |
---|
394 | cntvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'` |
---|
395 | files=${ofold}'/'${exp}'/'${shdvar}'mean.nc,'${ofold}'/'${exp}'/'${cntvar}'mean.nc' |
---|
396 | |
---|
397 | Lshdvals=`expr length ${shdvals}0` |
---|
398 | if test ${Lshdvals} -lt 2; then |
---|
399 | echo ${errormsg} |
---|
400 | echo " Error in drawing_tools.py 'variables_values'!!" |
---|
401 | echo " variable '"${shdvar}"' NOT found!" |
---|
402 | exit |
---|
403 | fi |
---|
404 | |
---|
405 | Lcntvals=`expr length ${cntvals}0` |
---|
406 | if test ${Lcntvals} -lt 2; then |
---|
407 | echo ${errormsg} |
---|
408 | echo " Error in drawing_tools.py 'variables_values'!!" |
---|
409 | echo " variable '"${cntvar}"' NOT found!" |
---|
410 | exit |
---|
411 | fi |
---|
412 | |
---|
413 | shdstdn=`echo ${shdvals} | tr ',' ' ' | awk '{print $1}'` |
---|
414 | shdcbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` |
---|
415 | shdmin=`echo ${shdvals} | tr ',' ' ' | awk '{print $3}'` |
---|
416 | shdmax=`echo ${shdvals} | tr ',' ' ' | awk '{print $4}'` |
---|
417 | |
---|
418 | cntstdn=`echo ${cntvals} | tr ',' ' ' | awk '{print $1}'` |
---|
419 | cntmin=`echo ${cntvals} | tr ',' ' ' | awk '{print $3}'` |
---|
420 | cntmax=`echo ${cntvals} | tr ',' ' ' | awk '{print $4}'` |
---|
421 | |
---|
422 | if test ${shdstdn} = 'ERROR' || test ${cntstdn} = 'ERROR'; then |
---|
423 | echo ${errmsg} |
---|
424 | echo " "${main}": wrong variable names!!!" |
---|
425 | echo " shdvals: "${shdvals} |
---|
426 | echo " cntvals: "${cntvals} |
---|
427 | echo " shdvar: "${shdvar}" cntvar: "${cntvar} |
---|
428 | exit |
---|
429 | fi |
---|
430 | |
---|
431 | cntcolor='black' |
---|
432 | cntfmt='%g' |
---|
433 | |
---|
434 | if test ${gpair} = 'va@ua'; then |
---|
435 | shdmin=`echo ${shdmin} | awk '{print $1/4.}'` |
---|
436 | shdmax=`echo ${shdmax} | awk '{print $1/4.}'` |
---|
437 | cntmin=`echo ${cntmin} | awk '{print $1/3.}'` |
---|
438 | cntmax=`echo ${cntmax} | awk '{print $1 + 20.}'` |
---|
439 | elif test ${gpair} = 'tas@ps'; then |
---|
440 | shdmin=`echo ${shdmin} | awk '{print $1 + 50.}'` |
---|
441 | shdmax=`echo ${shdmax} | awk '{print $1 - 15.}'` |
---|
442 | cntmin=`echo ${cntmin} | awk '{print $1 + 15000.}'` |
---|
443 | cntmax=`echo ${cntmax} | awk '{print $1 - 2000.}'` |
---|
444 | elif test ${gpair} = 'uas@vas'; then |
---|
445 | cntmin=`echo ${cntmin} | awk '{print $1 * 0.1}'` |
---|
446 | cntmax=`echo ${cntmax} | awk '{print $1 * 0.1}'` |
---|
447 | elif test ${gpair} = 'pr@rsds'; then |
---|
448 | # shdmax=`echo ${shdmax} | awk '{print $1 / 20.}'` |
---|
449 | cntmax=`echo ${cntmax} | awk '{print $1 / 3.}'` |
---|
450 | elif test ${gpair} = 'clt@cll' || test ${gpair} = 'clh@clm'; then |
---|
451 | cntcolor='red' |
---|
452 | cntfmt='%.1g' |
---|
453 | elif test ${gpair} = 'clh@clm'; then |
---|
454 | cntmax=`echo ${cntmax} | awk '{print $1}'` |
---|
455 | elif test ${gpair} = 'prw@huss'; then |
---|
456 | shdmax=`echo ${shdmax} | awk '{print $1*4}'` |
---|
457 | elif test ${gpair} = 'prls@prc'; then |
---|
458 | shdmax=`echo ${shdmax} | awk '{print $1/1.}'` |
---|
459 | cntmax=`echo ${cntmax} | awk '{print $1 * 0.5}'` |
---|
460 | elif test ${gpair} = 'hfls@hfss'; then |
---|
461 | cntmin='-50.' |
---|
462 | cntmax='50.' |
---|
463 | fi |
---|
464 | |
---|
465 | if test ${vark} = 'mean'; then |
---|
466 | graphvals=${shdstdn}','${cntstdn}':z|-1,y|-1:z|-1,y|-1:lat:pressure:' |
---|
467 | graphvals=${graphvals}${shdcbar}':fixsigc,'${cntcolor}':'${cntfmt}':'${shdmin}',' |
---|
468 | graphvals=${graphvals}${shdmax}':'${cntmin}','${cntmax}',9:LMDZ+WRF|'${exp} |
---|
469 | graphvals=${graphvals}'|meridional|monthly|average|of|'${shdstdn}'|&|' |
---|
470 | graphvals=${graphvals}${cntstdn}':pdf:flip@y:None' |
---|
471 | else |
---|
472 | graphvals=${shdstdn}','${cntstdn}':y|-1,time|-1:y|-1,time|-1:time:XLAT:' |
---|
473 | graphvals=${graphvals}${shdcbar}':fixsigc,'${cntcolor}':'${cntfmt}':'${shdmin}',' |
---|
474 | graphvals=${graphvals}${shdmax}':'${cntmin}','${cntmax}',9:WRF+LMDZ|'${exp} |
---|
475 | graphvals=${graphvals}'|mean|meridional|evolution|of|'${shdstdn}'|&|' |
---|
476 | graphvals=${graphvals}${cntstdn}':pdf:None:time|hours!since!1949-12-01|' |
---|
477 | graphvals=${graphvals}'exct,5,d|%d|date!([DD]):None' |
---|
478 | fi |
---|
479 | |
---|
480 | echo ${files} |
---|
481 | echo ${graphvals} |
---|
482 | echo ${shdstdn}'mean,'${cntstdn}'mean' |
---|
483 | |
---|
484 | if test ${vark} = 'sfc' || test ${vark} = 'diag' && |
---|
485 | ! $(isin_list ${coup2D} ${gpair}); then |
---|
486 | python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont_time -S ${graphvals} -v \ |
---|
487 | ${shdstdn}'mean,'${cntstdn}'mean' |
---|
488 | pyexc=$? |
---|
489 | else |
---|
490 | python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \ |
---|
491 | ${shdstdn}'mean,'${cntstdn}'mean' |
---|
492 | pyexc=$? |
---|
493 | fi |
---|
494 | if test ${pyexc} -ne 0; then |
---|
495 | echo ${errormsg} |
---|
496 | echo " "${main}": drawing.py fails!" |
---|
497 | exit |
---|
498 | else |
---|
499 | mv 2Dfields_shadow-contour.pdf ${ofold}/${exp}/${shdvar}mean_${cntvar}mean.pdf |
---|
500 | evince ${ofold}/${exp}/${shdvar}mean_${cntvar}mean.pdf & |
---|
501 | fi |
---|
502 | |
---|
503 | if $(isin_list ${coup2D} ${gpair}); then |
---|
504 | graphvals=${shdstdn}','${cntstdn}':south_north|-1,west_east|-1:' |
---|
505 | graphvals=${graphvals}'south_north|-1,west_east|-1:longitude:latitude:' |
---|
506 | graphvals=${graphvals}${shdcbar}':fixsigc,'${cntcolor}':'${cntfmt}':'${shdmin}',' |
---|
507 | graphvals=${graphvals}${shdmax}':'${cntmin}','${cntmax}',9:LMDZ+WRF|'${exp} |
---|
508 | graphvals=${graphvals}'|monthly|average|of|'${shdstdn}'|&|' |
---|
509 | graphvals=${graphvals}${cntstdn}':pdf:flip@y:None' |
---|
510 | echo ' '${shdstdn}'mean,'${cntstdn}'mean' |
---|
511 | |
---|
512 | python ${HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \ |
---|
513 | ${shdstdn}'mean,'${cntstdn}'mean' |
---|
514 | pyexc=$? |
---|
515 | if test ${pyexc} -ne 0; then |
---|
516 | echo ${errormsg} |
---|
517 | echo " "${main}": drawing.py fails!" |
---|
518 | exit |
---|
519 | else |
---|
520 | mv 2Dfields_shadow-contour.pdf ${ofold}/${exp}/${shdvar}tmean_${cntvar}tmean.pdf |
---|
521 | evince ${ofold}/${exp}/${shdvar}tmean_${cntvar}tmean.pdf & |
---|
522 | fi |
---|
523 | fi |
---|
524 | # exit |
---|
525 | |
---|
526 | # end of couples |
---|
527 | done |
---|
528 | # end of kinds |
---|
529 | done |
---|
530 | |
---|
531 | done |
---|
532 | fi |
---|
533 | |
---|
534 | # 2D single plots |
---|
535 | ## |
---|
536 | if ${single2Dplot}; then |
---|
537 | echo "2D single plots" |
---|
538 | for exp in ${exps}; do |
---|
539 | echo " exp:"${exp} |
---|
540 | for tmean in ${ofold}/${exp}/*tmean.nc ;do |
---|
541 | fname=`basename ${tmean}` |
---|
542 | var=`ncdump -h ${tmean} | grep float | grep mean | tr '(' ' ' | awk '{print $2}'` |
---|
543 | if test ! ${var} = 'cltmean'; then |
---|
544 | shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | \ |
---|
545 | grep all_values | awk '{print $3}'` |
---|
546 | cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` |
---|
547 | min=`echo ${shdvals} | tr ',' ' ' | awk '{print $3}'` |
---|
548 | max=`echo ${shdvals} | tr ',' ' ' | awk '{print $4}'` |
---|
549 | |
---|
550 | if test ${var} = 'prlsmean'; then xtrms='0,0.00015'; |
---|
551 | elif test ${var} = 'prwmean'; then xtrms='0,40'; |
---|
552 | elif test ${var} = 'psmean'; then xtrms='99000,102500'; |
---|
553 | elif test ${var} = 'r2mean'; then xtrms='0,0.025'; |
---|
554 | elif test ${var} = 'tasmean'; then xtrms='275,310'; |
---|
555 | elif test ${var} = 'tmlamean'; then xtrms='260,310'; |
---|
556 | elif test ${var} = 'uasmean'; then xtrms='-20,20'; |
---|
557 | elif test ${var} = 'vasmean'; then xtrms='-20,20'; |
---|
558 | else xtrms=${min}','${max}; fi |
---|
559 | |
---|
560 | # vals=${var}':XLONG|-1,XLAT|-1:XLONG:XLAT:'${cbar}':'${xtrms}':monthly|mean:pdf:' |
---|
561 | # vals=${vals}'None:None:true' |
---|
562 | # dims='south_north@XLAT,west_east@XLONG' |
---|
563 | python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \ |
---|
564 | -f ${tmean} -v XLONG,XLAT |
---|
565 | vals=${var}':longitude|-1,latitude|-1:longitude:latitude:'${cbar}':'${xtrms}':monthly|mean:pdf:' |
---|
566 | vals=${vals}'None:None:true' |
---|
567 | dims='south_north@latitude,west_east@longitude' |
---|
568 | python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${tmean} -v ${var} |
---|
569 | pyexec=$? |
---|
570 | if test ${pyexec} -ne 0; then |
---|
571 | echo ${errormsg} |
---|
572 | echo " "${main}": python fails!" |
---|
573 | exit |
---|
574 | else |
---|
575 | mv 2Dfields_shadow.pdf ${ofold}/${exp}/${var}tmean.pdf |
---|
576 | # evince ${ofold}/${exp}/${var}tmean.pdf & |
---|
577 | # exit |
---|
578 | fi |
---|
579 | fi |
---|
580 | done |
---|
581 | done |
---|
582 | fi |
---|
583 | |
---|
584 | # lon 2 vertical section |
---|
585 | ## |
---|
586 | echo "lon 2 vertical section ..." |
---|
587 | vars=`echo ${lon2DZsecvars} | tr ':' ' '` |
---|
588 | pts=`echo ${lon2DZsecpts} | tr ':' ' '` |
---|
589 | |
---|
590 | if ${lonZsec}; then |
---|
591 | for exp in ${exps}; do |
---|
592 | file=${ofold}/${exp}/vertical_interpolation_WRFp.nc |
---|
593 | # python ${HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \ |
---|
594 | # -f ${file} -v lon,lat |
---|
595 | ## ALREADY done! |
---|
596 | # python ${HOMEpy}/nc_var.py -o valmod -S lowthres@oper,0.,sumc,360. -f ${file} \ |
---|
597 | # -v lon |
---|
598 | if test ${exp} = 'AR40'; then labexp='wlmdza' |
---|
599 | else labexp='wlmdzb'; fi |
---|
600 | |
---|
601 | for pt in ${pts}; do |
---|
602 | echo " pt: "${pt} |
---|
603 | vals='x:15|y:'${pt}'|time:23' |
---|
604 | lonval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lon | \ |
---|
605 | awk '{print $2}'` |
---|
606 | latval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lat | \ |
---|
607 | awk '{print $2}'` |
---|
608 | tval=`python ${HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v time | \ |
---|
609 | awk '{print $2}'` |
---|
610 | for var in ${vars}; do |
---|
611 | echo " var: "${var} |
---|
612 | |
---|
613 | shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | \ |
---|
614 | grep all_values | awk '{print $3}'` |
---|
615 | cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` |
---|
616 | min=`echo ${shdvals} | tr ',' ' ' | awk '{print $3}'` |
---|
617 | max=`echo ${shdvals} | tr ',' ' ' | awk '{print $4}'` |
---|
618 | |
---|
619 | # WRFt,U,V,WRFrh,WRFght |
---|
620 | if test ${var} = 'WRFght'; then xtrms='0,40000'; |
---|
621 | elif test ${var} = 'WRFt'; then xtrms='200,300'; |
---|
622 | elif test ${var} = 'U'; then xtrms='-40,40'; |
---|
623 | elif test ${var} = 'V'; then xtrms='-20,20'; |
---|
624 | else xtrms=${min}','${max}; fi |
---|
625 | |
---|
626 | # Plotting |
---|
627 | vals=${var}':x|-1,y|'${pt}',z|-1,time|24:lon:pressure:'${cbar}':' |
---|
628 | vals=${vals}${xtrms}':'${labexp}'|vertical|longitudinal|section|('${latval} |
---|
629 | vals=${vals}'$^{\circ}$):pdf:flip@y:None:true' |
---|
630 | python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var} |
---|
631 | pyexec=$? |
---|
632 | if test ${pyexec} -ne 0; then |
---|
633 | echo ${errormsg} |
---|
634 | echo " "${main}": python fails!" |
---|
635 | exit |
---|
636 | else |
---|
637 | mv 2Dfields_shadow.pdf ${ofold}/${exp}/${var}_lonZsec_${pt}pt.pdf |
---|
638 | evince ${ofold}/${exp}/${var}_lonZsec_${pt}pt.pdf & |
---|
639 | fi |
---|
640 | |
---|
641 | cntcolor='black' |
---|
642 | cntfmt='%g' |
---|
643 | |
---|
644 | if test ${var} = 'WRFght'; then cxtrms='0,40000'; |
---|
645 | elif test ${var} = 'WRFt'; then cxtrms='200,300'; |
---|
646 | elif test ${var} = 'U'; then cxtrms='-40,40'; |
---|
647 | elif test ${var} = 'V'; then cxtrms='-20,20'; |
---|
648 | else cxtrms=${min}','${max}; fi |
---|
649 | |
---|
650 | graphvals=${var}','${var}':x|-1,y|'${pt}',z|-1,time|24:' |
---|
651 | graphvals=${graphvals}'x|-1,y|'${pt}',z|-1,time|24:lon:pressure:' |
---|
652 | graphvals=${graphvals}${cbar}':fixsigc,'${cntcolor}':'${cntfmt}':'${xtrms}':' |
---|
653 | graphvals=${graphvals}${cxtrms}',15:'${labexp} |
---|
654 | graphvals=${graphvals}'|vertical|zonal|section|('${latval}'$^{\circ}$):pdf:' |
---|
655 | graphvals=${graphvals}'flip@y:None' |
---|
656 | |
---|
657 | python ${HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \ |
---|
658 | -f ${file},${file} -v ${var},${var} |
---|
659 | pyexec=$? |
---|
660 | if test ${pyexec} -ne 0; then |
---|
661 | echo ${errormsg} |
---|
662 | echo " "${main}": python fails!" |
---|
663 | exit |
---|
664 | else |
---|
665 | mv 2Dfields_shadow-contour.pdf ${ofold}/${exp}/${var}_lonZsec-cnt_${pt}pt.pdf |
---|
666 | evince ${ofold}/${exp}/${var}_lonZsec-cnt_${pt}pt.pdf & |
---|
667 | fi |
---|
668 | |
---|
669 | # exit |
---|
670 | done |
---|
671 | done |
---|
672 | done |
---|
673 | fi |
---|
674 | |
---|
675 | echo "Computing differences" |
---|
676 | exp1=`echo ${experiments} | tr ':' ' ' | awk '{print $1}'` |
---|
677 | exp2=`echo ${experiments} | tr ':' ' ' | awk '{print $2}'` |
---|
678 | |
---|
679 | diffks=`echo ${diffkinds} | tr ':' ' '` |
---|
680 | |
---|
681 | if test ${differences}; then |
---|
682 | for kind in ${diffks}; do |
---|
683 | echo ${kind} |
---|
684 | case ${kind} in |
---|
685 | 'diffZ') |
---|
686 | vars=`echo ${diffZvars} | tr ':' ' '` |
---|
687 | fileorigd='mean.nc' |
---|
688 | ;; |
---|
689 | 'diffH') |
---|
690 | vars=`echo ${diffHvars} | tr ':' ' '` |
---|
691 | fileorigd='tmean.nc' |
---|
692 | ;; |
---|
693 | esac |
---|
694 | |
---|
695 | echo " "${var} |
---|
696 | for var in ${vars}; do |
---|
697 | if test ! -f ${ofold}/${var}_diff.nc; then |
---|
698 | # cdo sub ${ofold}/${exp1}/${var}${fileorigd} ${ofold}/${exp2}/${var}${fileorigd} ${ofold}/${var}_diff.nc |
---|
699 | if test ${kind} = 'diffZ'; then |
---|
700 | values='pressure|lat@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,' |
---|
701 | values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean' |
---|
702 | python ${HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var} |
---|
703 | pyexec=$? |
---|
704 | if test ${pyexec} -ne 0; then |
---|
705 | echo ${errormsg} |
---|
706 | echo " "${main}": python fails!" |
---|
707 | exit |
---|
708 | fi |
---|
709 | mv opersvarsfiles_${var}.nc ${ofold}/${var}_diff.nc |
---|
710 | else |
---|
711 | values='longitude|latitude@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,' |
---|
712 | values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean' |
---|
713 | python ${HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var} |
---|
714 | pyexec=$? |
---|
715 | if test ${pyexec} -ne 0; then |
---|
716 | echo ${errormsg} |
---|
717 | echo " "${main}": python fails!" |
---|
718 | exit |
---|
719 | fi |
---|
720 | mv opersvarsfiles_${var}.nc ${ofold}/${var}_diff.nc |
---|
721 | fi |
---|
722 | fi |
---|
723 | done |
---|
724 | |
---|
725 | if test ${kind} = 'diffZ'; then |
---|
726 | coups=`echo ${graph_couples_mean} | tr ':' ' '` |
---|
727 | for coup in ${coups}; do |
---|
728 | shdvar=`echo ${coup} | tr '@' ' ' | awk '{print $1}'` |
---|
729 | cntvar=`echo ${coup} | tr '@' ' ' | awk '{print $2}'` |
---|
730 | |
---|
731 | echo " couple: "${shdvar}'-'${cntvar} |
---|
732 | |
---|
733 | shdvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'` |
---|
734 | cntvals=`python ${HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'` |
---|
735 | files=${ofold}'/'${shdvar}'_diff.nc,'${ofold}'/'${cntvar}'_diff.nc' |
---|
736 | |
---|
737 | shdstdn=`echo ${shdvals} | tr ',' ' ' | awk '{print $1}'` |
---|
738 | shdcbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` |
---|
739 | shdmin=`echo ${shdvals} | tr ',' ' ' | awk '{print $3}'` |
---|
740 | shdmax=`echo ${shdvals} | tr ',' ' ' | awk '{print $4}'` |
---|
741 | |
---|
742 | cntstdn=`echo ${cntvals} | tr ',' ' ' | awk '{print $1}'` |
---|
743 | cntmin=`echo ${cntvals} | tr ',' ' ' | awk '{print $3}'` |
---|
744 | cntmax=`echo ${cntvals} | tr ',' ' ' | awk '{print $4}'` |
---|
745 | |
---|
746 | shdcbar='seismic' |
---|
747 | if test ${coup} = 'va@ua'; then |
---|
748 | shdmin=-4. |
---|
749 | shdmax=4. |
---|
750 | cntmin=-10. |
---|
751 | cntmax=10. |
---|
752 | elif test ${coup} = 'hus@ta'; then |
---|
753 | shdmin=-0.2 |
---|
754 | shdmax=0.2 |
---|
755 | cntmin=-2. |
---|
756 | cntmax=2. |
---|
757 | fi |
---|
758 | |
---|
759 | cntcolor='black' |
---|
760 | cntfmt='%g' |
---|
761 | |
---|
762 | graphvals=${shdstdn}','${cntstdn}':x|-1,y|-1,x_2|-1:x|-1,y|-1,x_2|-1:lat:' |
---|
763 | graphvals=${graphvals}'pressure:'${shdcbar}':fixsigc,'${cntcolor}':'${cntfmt}':' |
---|
764 | graphvals=${graphvals}${shdmin}','${shdmax}':'${cntmin}','${cntmax}',9:' |
---|
765 | graphvals=${graphvals}${exp1}'-'${exp2}'|meridional|monthly|average|differences|of|' |
---|
766 | graphvals=${graphvals}${shdstdn}'|&|'${cntstdn}':pdf:flip@y:None' |
---|
767 | |
---|
768 | python ${HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \ |
---|
769 | -f ${files} -v ${shdvar},${cntvar} |
---|
770 | pyexec=$? |
---|
771 | if test ${pyexec} -ne 0; then |
---|
772 | echo ${errormsg} |
---|
773 | echo " "${main}": python fails!" |
---|
774 | exit |
---|
775 | else |
---|
776 | mv 2Dfields_shadow-contour.pdf ${ofold}/${shdvar}-${cntvar}_diff.pdf |
---|
777 | evince ${ofold}/${shdvar}-${cntvar}_diff.pdf & |
---|
778 | fi |
---|
779 | done |
---|
780 | # exit |
---|
781 | else |
---|
782 | for var in ${vars}; do |
---|
783 | echo " "${var} |
---|
784 | vals=`python ${HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'` |
---|
785 | file=${ofold}/${var}_diff.nc |
---|
786 | |
---|
787 | stdn=`echo ${vals} | tr ',' ' ' | awk '{print $1}'` |
---|
788 | cbar='seismic' |
---|
789 | |
---|
790 | if test ${var} = 'uas'; then xtrms='-10.,10.'; |
---|
791 | elif test ${var} = 'vas'; then xtrms='-5,5'; |
---|
792 | elif test ${var} = 'ps'; then xtrms='-500,500'; |
---|
793 | elif test ${var} = 'pr'; then xtrms='-0.001,0.001'; |
---|
794 | else xtrms=${min}','${max}; fi |
---|
795 | |
---|
796 | vals=${var}':x|-1,y|-1:longitude:latitude:'${cbar}':' |
---|
797 | vals=${vals}${xtrms}':'${exp1}'-'${exp2}'|meridional|monthly|average|differences:' |
---|
798 | vals=${vals}'pdf:None:None:true' |
---|
799 | python ${HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var} |
---|
800 | pyexec=$? |
---|
801 | if test ${pyexec} -ne 0; then |
---|
802 | echo ${errormsg} |
---|
803 | echo " "${main}": python fails!" |
---|
804 | exit |
---|
805 | else |
---|
806 | mv 2Dfields_shadow.pdf ${ofold}/${var}_diff.pdf |
---|
807 | evince ${ofold}/${var}_diff.pdf & |
---|
808 | fi |
---|
809 | # exit |
---|
810 | done |
---|
811 | fi |
---|
812 | done |
---|
813 | fi |
---|