Changeset 993 in lmdz_wrf
- Timestamp:
- Aug 9, 2016, 5:24:31 PM (9 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/tools/model_graphics.bash ¶
r977 r993 220 220 word=$2 221 221 222 if test $# -ne 2; then 223 echo ${errmsg} 224 echo " "$fname}": wrong number of arguments !!" 225 echo " 2 are required and "$#" are given!" 226 echo " passed: "$0 227 exit 228 fi 229 230 222 231 Lstring=`expr length ${string}` 223 232 Lword=`expr length ${word}` 224 233 234 if test ${Lstring} -lt 1; then 235 echo ${errmsg} 236 echo " "$fname}": wrong string '"${string}"' !!" 237 exit 238 fi 239 240 if test ${Lword} -lt 1; then 241 echo ${errmsg} 242 echo " "$fname}": wrong word '"${word}"' !!" 243 exit 244 fi 245 225 246 Lfinalstring=`expr ${Lstring} - ${Lword}` 226 247 … … 1237 1258 fname='draw_plot' 1238 1259 1239 set -x1240 1241 1260 plot=$1 1242 1261 odir=$2 … … 1248 1267 if test ${additional} = 'diff'; then 1249 1268 specvarplot=${diffspecificvarplot} 1250 fi 1251 specvarplot=${specificvarplot} 1269 else 1270 specvarplot=${specificvarplot} 1271 fi 1252 1272 fi 1253 1273 … … 1342 1362 specific=false 1343 1363 # if $(isInlist ${specvarplot} ${varn}); then 1344 if test $(index_string ${specvarplot} ${v n}) -ne -1; then1345 vals=`list_filter ${specvarplot} ${v n}`1346 kvals=`list_filter ${ specvarplot} ${kind}`1364 if test $(index_string ${specvarplot} ${varn}) -ne -1; then 1365 vals=`list_filter ${specvarplot} ${varn}` 1366 kvals=`list_filter ${vals} ${kind}` 1347 1367 Lkvals=`expr length ${kvals}'0'` 1348 1368 if test ${Lkvals} -gt 1; then … … 1355 1375 colorbar=`echo ${fkvals} | tr '|' ' ' | awk '{print $6}'` 1356 1376 cntformat=`echo ${fkvals} | tr '|' ' ' | awk '{print $7}'` 1357 colorcnt=`echo ${fkvals} | tr '|' ' ' | awk '{print $8}' `1377 colorcnt=`echo ${fkvals} | tr '|' ' ' | awk '{print $8}' | tr ':' ' ' | awk '{print $1}'` 1358 1378 fi 1359 1379 fi … … 1619 1639 differences=true 1620 1640 1621 combosfile=${ HOMEpy}/diagnostics.inf1641 combosfile=${pyHOME}/diagnostics.inf 1622 1642 1623 1643 ####### ###### ##### #### ### ## # … … 1649 1669 esac 1650 1670 1651 modinf=`$ pyHOME/nc_var.py -o model_characteristics -f None -S ${mod} | \1671 modinf=`${pyHOME}/nc_var.py -o model_characteristics -f None -S ${mod} | \ 1652 1672 grep singleline | awk '{print $2}'` 1653 1673 ferrmsg $? $main "python!'model_characteristics'!failed" … … 1824 1844 vdiffs=`echo ${vardiff} | tr ':' ' '` 1825 1845 ivd=1 1846 echo " Computing diff statistics ..." 1826 1847 for vdiff in ${vdiffs}; do 1827 1848 echo ${vdiff}" ..." … … 1832 1853 vn=`echo ${vdiff} | tr '|' ' ' | awk '{print $1}'` 1833 1854 ops='None' 1834 fi 1835 fileh=`echo ${varcompute} | tr ';' '\n' | grep ${vdiff} | tr '|' ' ' | awk '{print $3}'` 1855 fi 1856 #Modify in case of combo 1857 if test $(expr index ${ops} '@') -eq 0; then 1858 fileh=`echo ${varcompute} | tr ';' '\n' | grep ${vdiff} | tr '|' ' ' | \ 1859 awk '{print $3}'` 1860 else 1861 set -x 1862 Lcombo=`expr length ${vn}';'${ops}'|combo|'` 1863 Lvarcompute=`expr length ${varcompute}` 1864 indcombo=`index_string ${varcompute} ${vn}';'${ops}'|combo|'` 1865 Lindcombo=`expr ${Lvarcompute} - ${indcombo}` 1866 1867 fileh=`echo ${varcompute:${indcombo}:${Lindcombo}} | tr ';' '\n' | \ 1868 head -n 2 | tail -n 1 | tr '|' ' ' | awk '{print $3}'` 1869 if test $(index_string ${ops} pinterp) -ne -1; then fileh=${fileh}'p_pinterp'; fi 1870 fi 1836 1871 1837 1872 owdir=${ofold}/${mod}/${difexp1}-${difexp2} … … 1844 1879 if ${filescratch}; then rm ${owdir}/${filen} >& /dev/null; fi 1845 1880 if test ! -f ${owdir}/${filen}; then 1881 set -x 1846 1882 dfile1=${ofold}/${mod}/${difexp1}/${filen} 1847 1883 dfile2=${ofold}/${mod}/${difexp2}/${filen} … … 1849 1885 dfiles='add|'${dfile1}'|'${vn}',sub|'${dfile2}'|'${vn} 1850 1886 dims='time|pres|lat|lon@'${dfiles} 1887 Lfileh=`expr length ${fileh}` 1888 Lfileh1=`expr ${Lfileh} - 1` 1851 1889 echo "python ${pyHOME}/nc_var.py -S ${dims} -o compute_opersvarsfiles -v ${vn}" 1852 1890 pyout=`python ${pyHOME}/nc_var.py -S ${dims} -o compute_opersvarsfiles -v ${vn}` … … 1858 1896 fi 1859 1897 1860 echo " Computing diff statistics ..."1861 1862 1898 cfdims='lon:lat:pres:time' 1863 1899 cfvdims='lon:lat:pres:time' 1864 1900 cdiffvn=`echo ${filen} | tr '_' ' ' | awk '{print $1}'` 1865 cdiffh=`echo ${filen} | tr '_' ' ' | awk '{print $2}' | tr '.' ' ' | awk '{print $1}'` 1901 cdiffh=`echo ${filen} | tr '_' ' ' | awk '{print $2}' | tr '.' ' ' | \ 1902 awk '{print $1}'` 1866 1903 1867 1904 cdiffvar=${cdiffvn}'|'${ops}'|'${cdiffh}'|None|None' 1868 1905 1869 compute_statistics ${owdir} ${filen} ${owdir} ${cdiffvar} ${cfdims} ${cfvdims} \1870 ${filescratch}1871 1872 # Computing combos1873 if test $(expr index ${ops} '@') -ne -1; then1906 if test $(expr index ${ops} '@') -eq 0; then 1907 compute_statistics ${owdir} ${filen} ${owdir} ${cdiffvar} ${cfdims} \ 1908 ${cfvdims} ${filescratch} 1909 else 1910 # Computing combos 1874 1911 echo " Computing combos: "${ops} 1875 combs=`echo ${ops} | tr ' ;' ' ' | awk '{print $2}' | tr '@' ' '`1876 ifile=${cdiffvn}_${f head}1912 combs=`echo ${ops} | tr '@' ' '` 1913 ifile=${cdiffvn}_${fileh} 1877 1914 for comb in ${combs}; do 1878 1915 combcvar=${cdiffvn}'|'${comb}'|'${cdiffh}'|None|None' … … 1898 1935 # Diff plotting 1899 1936 ## 1900 set -x1901 1902 1937 echo " "${main}": Plotting diff figures ..." 1903 1938 if ${figscratch}; then rm diffplotsdraw.inf; fi … … 1963 1998 dvals='T:Time,Z:bottom_top,Y:south_north,X:west_east' 1964 1999 dimnames='T:Time,Z:bottom_top,Y:south_north,X:west_east' 1965 python ${ HOMEpy}/vertical_interpolation.py \2000 python ${pyHOME}/vertical_interpolation.py \ 1966 2001 -f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin' \ 1967 2002 -v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG … … 1969 2004 echo ${errormsg} 1970 2005 echo " python failed!" 1971 echo " python ${ HOMEpy}/vertical_interpolation.py" \2006 echo " python ${pyHOME}/vertical_interpolation.py" \ 1972 2007 "-f ${ofold}/${exp}/${filensfc} -o WRFp -i ${plevels} -k 'lin'" \ 1973 2008 "-v WRFt,U,V,WRFrh,WRFght -d ${dimnames} -D T:Times,Z:ZNU,Y:XLAT,X:XLONG" … … 1984 2019 fileworig=${filensfc} 1985 2020 cp ${ifoldsfc}/${exp}/${fileworig} ${ifoldsfc}/${exp}/${filensfc} 1986 python ${ HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f ${ifoldsfc}/${exp}/${filensfc} \2021 python ${pyHOME}/nc_var.py -o WRF_CFxtime_creation -f ${ifoldsfc}/${exp}/${filensfc} \ 1987 2022 -S 19491201000000,hours -v time 1988 python ${ HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f ${ifoldsfc}/${exp}/${filensfc}\2023 python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -f ${ifoldsfc}/${exp}/${filensfc}\ 1989 2024 -S longitude,latitude -v XLONG,XLAT 1990 2025 fi … … 2005 2040 echo " var:"${var} 2006 2041 varn=`echo ${var} | tr '_' ' ' | awk '{print $2}'` 2007 combo=`python ${ HOMEpy}/diagnostics.py -f ${combosfile} -d variable_combo -v ${varn}\2042 combo=`python ${pyHOME}/diagnostics.py -f ${combosfile} -d variable_combo -v ${varn}\ 2008 2043 | grep COMBO | awk '{print $2}'` 2009 2044 if test ${combo} = 'ERROR'; then … … 2019 2054 ivar=`expr ${ivar} + 1` 2020 2055 done 2021 python ${ HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc} -v \2056 python ${pyHOME}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc} -v \ 2022 2057 ${varcombos} 2023 2058 if test $? -ne 0; then 2024 2059 echo ${errormsg} 2025 2060 echo " python failed!!" 2026 echo python ${ HOMEpy}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc}\2061 echo python ${pyHOME}/diagnostics.py -d ${values} -f ${ifoldsfc}/${exp}/${filensfc}\ 2027 2062 -v ${varcombos} 2028 2063 exit 2029 2064 fi 2030 python ${ HOMEpy}/nc_var.py -o WRF_CFxtime_creation -f diagnostics.nc \2065 python ${pyHOME}/nc_var.py -o WRF_CFxtime_creation -f diagnostics.nc \ 2031 2066 -S 19491201000000,hours -v time 2032 python ${ HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -f diagnostics.nc \2067 python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -f diagnostics.nc \ 2033 2068 -S longitude,latitude -v XLONG,XLAT 2034 2069 mv diagnostics.nc ${ifolddiag}/${exp} … … 2049 2084 echo " var: "${varn} 2050 2085 var=`echo ${varn} | tr '|' ' ' | awk '{print $2}'` 2051 varval=`python ${ HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`2086 varval=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'` 2052 2087 varname=`echo ${varval} | tr ',' ' ' | awk '{print $1}'` 2053 2088 … … 2058 2093 if test ${vark} = 'mean'; then 2059 2094 vals='time:-1|z:-1|y:-1|x:-1,time:x,mean,pressure:lat' 2060 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}2095 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} 2061 2096 pyexec=$? 2062 2097 if test ${pyexec} -ne 0; then 2063 2098 echo ${errormsg} 2064 2099 echo " "${main}": python fai1ls!" 2065 echo "python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}"2100 echo "python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}" 2066 2101 exit 2067 2102 else … … 2077 2112 if test ${var} = 'ACRAINTOT'; then 2078 2113 files='add|'${file}'|RAINC,add|'${file}'|RAINNC' 2079 python ${ HOMEpy}/nc_var.py -S 'time|XLAT|XLONG@'${files} -o compute_opersvarsfiles \2114 python ${pyHOME}/nc_var.py -S 'time|XLAT|XLONG@'${files} -o compute_opersvarsfiles \ 2080 2115 -v ${var} 2081 2116 mv opersvarsfiles_${var}.nc ${ofold}/${exp} … … 2083 2118 elif test ${var} = 'RAINTOT'; then 2084 2119 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2085 python ${ HOMEpy}/diagnostics.py -d ${dims} -v 'RAINTOT|RAINC@RAINNC@time' -f ${file}2120 python ${pyHOME}/diagnostics.py -d ${dims} -v 'RAINTOT|RAINC@RAINNC@time' -f ${file} 2086 2121 mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc 2087 2122 file=${ofold}/${exp}/diagnostics_${varname}.nc … … 2095 2130 var=${cl} 2096 2131 echo " var: "${var} 2097 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}2132 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} 2098 2133 pyexec=$? 2099 2134 if test ${pyexec} -ne 0; then 2100 2135 echo ${errormsg} 2101 2136 echo " "${main}": python fails!" 2102 echo python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}2137 echo python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} 2103 2138 exit 2104 2139 fi … … 2106 2141 vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' 2107 2142 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2108 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl}2143 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cl} 2109 2144 pyexec=$? 2110 2145 if test ${pyexec} -ne 0; then … … 2120 2155 elif test ${var} = 'WRFbils' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then 2121 2156 dims='Time@time,south_north@XLAT,west_east@XLONG' 2122 python ${ HOMEpy}/diagnostics.py -d ${dims} -v 'WRFbils|HFX@LH' -f ${file}2157 python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFbils|HFX@LH' -f ${file} 2123 2158 mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc 2124 2159 file=${ofold}/${exp}/diagnostics_${varname}.nc … … 2126 2161 elif test ${var} = 'WRFprw' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then 2127 2162 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2128 python ${ HOMEpy}/diagnostics.py -d ${dims} -v 'WRFprw|WRFdens@QVAPOR' -f ${file}2163 python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFprw|WRFdens@QVAPOR' -f ${file} 2129 2164 mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc 2130 2165 file=${ofold}/${exp}/diagnostics_${varname}.nc … … 2132 2167 elif test ${var} = 'WRFrhs' && test ! -f ${ofold}/${exp}/diagnostics_${varname}.nc; then 2133 2168 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2134 python ${ HOMEpy}/diagnostics.py -d ${dims} -v 'WRFrhs|PSFC@T2@Q2' -f ${file}2169 python ${pyHOME}/diagnostics.py -d ${dims} -v 'WRFrhs|PSFC@T2@Q2' -f ${file} 2135 2170 mv diagnostics.nc ${ofold}/${exp}/diagnostics_${varname}.nc 2136 2171 file=${ofold}/${exp}/diagnostics_${varname}.nc … … 2146 2181 fi 2147 2182 if test ! -f ${ofold}/${exp}/${varname}${oper}.nc; then 2148 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}2183 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} 2149 2184 pyexec=$? 2150 2185 if test ${pyexec} -ne 0; then … … 2167 2202 vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' 2168 2203 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2169 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cld}2204 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${cld} 2170 2205 pyexec=$? 2171 2206 if test ${pyexec} -ne 0; then … … 2181 2216 vals='Time:-1|south_north:-1|west_east:-1,Time,mean,XLONG:XLAT' 2182 2217 dims='Time@time,bottom_top@ZNU,south_north@XLAT,west_east@XLONG' 2183 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var}2218 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${file} -v ${var} 2184 2219 pyexec=$? 2185 2220 if test ${pyexec} -ne 0; then … … 2217 2252 dims='bottom_top@bottom_top,south_north@south_north,west_east@west_east' 2218 2253 if test ! -f ${ofold}/${exp}/${var}t-lonmean.nc; then 2219 python ${ HOMEpy}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${tmean} -v ${var}2254 python ${pyHOME}/nc_var.py -o file_oper_alongdims -S ${vals} -f ${tmean} -v ${var} 2220 2255 pyexec=$? 2221 2256 if test ${pyexec} -ne 0; then … … 2257 2292 cntvar=`echo ${gpair} | tr '@' ' ' | awk '{print $2}'` 2258 2293 echo " couple: "${shdvar}'-'${cntvar} 2259 shdvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`2260 cntvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`2294 shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'` 2295 cntvals=`python ${pyHOME}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'` 2261 2296 files=${ofold}'/'${exp}'/'${shdvar}'mean.nc,'${ofold}'/'${exp}'/'${cntvar}'mean.nc' 2262 2297 … … 2350 2385 if test ${vark} = 'sfc' || test ${vark} = 'diag' && 2351 2386 ! $(isin_list ${coup2D} ${gpair}); then 2352 python ${ HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont_time -S ${graphvals} -v \2387 python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont_time -S ${graphvals} -v \ 2353 2388 ${shdstdn}'mean,'${cntstdn}'mean' 2354 2389 pyexc=$? 2355 2390 else 2356 python ${ HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \2391 python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \ 2357 2392 ${shdstdn}'mean,'${cntstdn}'mean' 2358 2393 pyexc=$? … … 2376 2411 echo ' '${shdstdn}'mean,'${cntstdn}'mean' 2377 2412 2378 python ${ HOMEpy}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \2413 python ${pyHOME}/drawing.py -f ${files} -o draw_2D_shad_cont -S ${graphvals} -v \ 2379 2414 ${shdstdn}'mean,'${cntstdn}'mean' 2380 2415 pyexc=$? … … 2408 2443 var=`ncdump -h ${tmean} | grep float | grep mean | tr '(' ' ' | awk '{print $2}'` 2409 2444 if test ! ${var} = 'cltmean'; then 2410 shdvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${var} | \2445 shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | \ 2411 2446 grep all_values | awk '{print $3}'` 2412 2447 cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` … … 2427 2462 # vals=${vals}'None:None:true' 2428 2463 # dims='south_north@XLAT,west_east@XLONG' 2429 python ${ HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \2464 python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \ 2430 2465 -f ${tmean} -v XLONG,XLAT 2431 2466 vals=${var}':longitude|-1,latitude|-1:longitude:latitude:'${cbar}':'${xtrms}':monthly|mean:pdf:' 2432 2467 vals=${vals}'None:None:true' 2433 2468 dims='south_north@latitude,west_east@longitude' 2434 python ${ HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${tmean} -v ${var}2469 python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${tmean} -v ${var} 2435 2470 pyexec=$? 2436 2471 if test ${pyexec} -ne 0; then … … 2457 2492 for exp in ${exps}; do 2458 2493 file=${ofold}/${exp}/vertical_interpolation_WRFp.nc 2459 # python ${ HOMEpy}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \2494 # python ${pyHOME}/nc_var.py -o WRF_CFlonlat_creation -S longitude,latitude \ 2460 2495 # -f ${file} -v lon,lat 2461 2496 ## ALREADY done! 2462 # python ${ HOMEpy}/nc_var.py -o valmod -S lowthres@oper,0.,sumc,360. -f ${file} \2497 # python ${pyHOME}/nc_var.py -o valmod -S lowthres@oper,0.,sumc,360. -f ${file} \ 2463 2498 # -v lon 2464 2499 if test ${exp} = 'AR40'; then labexp='wlmdza' … … 2468 2503 echo " pt: "${pt} 2469 2504 vals='x:15|y:'${pt}'|time:23' 2470 lonval=`python ${ HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lon | \2505 lonval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v lon | \ 2471 2506 awk '{print $2}'` 2472 latval=`python ${ HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v lat | \2507 latval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v lat | \ 2473 2508 awk '{print $2}'` 2474 tval=`python ${ HOMEpy}/nc_var.py -o varout -f ${file} -S ${vals} -v time | \2509 tval=`python ${pyHOME}/nc_var.py -o varout -f ${file} -S ${vals} -v time | \ 2475 2510 awk '{print $2}'` 2476 2511 for var in ${vars}; do 2477 2512 echo " var: "${var} 2478 2513 2479 shdvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${var} | \2514 shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | \ 2480 2515 grep all_values | awk '{print $3}'` 2481 2516 cbar=`echo ${shdvals} | tr ',' ' ' | awk '{print $7}'` … … 2494 2529 vals=${vals}${xtrms}':'${labexp}'|vertical|longitudinal|section|('${latval} 2495 2530 vals=${vals}'$^{\circ}$):pdf:flip@y:None:true' 2496 python ${ HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}2531 python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var} 2497 2532 pyexec=$? 2498 2533 if test ${pyexec} -ne 0; then … … 2521 2556 graphvals=${graphvals}'flip@y:None' 2522 2557 2523 python ${ HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \2558 python ${pyHOME}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \ 2524 2559 -f ${file},${file} -v ${var},${var} 2525 2560 pyexec=$? … … 2566 2601 values='pressure|lat@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,' 2567 2602 values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean' 2568 python ${ HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}2603 python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var} 2569 2604 pyexec=$? 2570 2605 if test ${pyexec} -ne 0; then … … 2577 2612 values='longitude|latitude@add|'${ofold}'/'${exp1}'/'${var}${fileorigd}'|'${var}'mean,' 2578 2613 values=${values}'sub|'${ofold}'/'${exp2}'/'${var}${fileorigd}'|'${var}'mean' 2579 python ${ HOMEpy}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var}2614 python ${pyHOME}/nc_var.py -o compute_opersvarsfiles -S ${values} -v ${var} 2580 2615 pyexec=$? 2581 2616 if test ${pyexec} -ne 0; then … … 2597 2632 echo " couple: "${shdvar}'-'${cntvar} 2598 2633 2599 shdvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'`2600 cntvals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'`2634 shdvals=`python ${pyHOME}/drawing.py -o variable_values -S ${shdvar} | grep all_values | awk '{print $3}'` 2635 cntvals=`python ${pyHOME}/drawing.py -o variable_values -S ${cntvar} | grep all_values | awk '{print $3}'` 2601 2636 files=${ofold}'/'${shdvar}'_diff.nc,'${ofold}'/'${cntvar}'_diff.nc' 2602 2637 … … 2632 2667 graphvals=${graphvals}${shdstdn}'|&|'${cntstdn}':pdf:flip@y:None' 2633 2668 2634 python ${ HOMEpy}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \2669 python ${pyHOME}/drawing.py -o draw_2D_shad_cont -S ${graphvals} \ 2635 2670 -f ${files} -v ${shdvar},${cntvar} 2636 2671 pyexec=$? … … 2648 2683 for var in ${vars}; do 2649 2684 echo " "${var} 2650 vals=`python ${ HOMEpy}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'`2685 vals=`python ${pyHOME}/drawing.py -o variable_values -S ${var} | grep all_values | awk '{print $3}'` 2651 2686 file=${ofold}/${var}_diff.nc 2652 2687 … … 2663 2698 vals=${vals}${xtrms}':'${exp1}'-'${exp2}'|meridional|monthly|average|differences:' 2664 2699 vals=${vals}'pdf:None:None:true' 2665 python ${ HOMEpy}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var}2700 python ${pyHOME}/drawing.py -o draw_2D_shad -S ${vals} -f ${file} -v ${var} 2666 2701 pyexec=$? 2667 2702 if test ${pyexec} -ne 0; then -
TabularUnified trunk/tools/model_graphics_template.dat ¶
r977 r993 16 16 17 17 # python HOME 18 HOMEpy = ${HOME}/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools 18 pyHOME = /home/lluis/etudes/WRF_LMDZ/svn/LMDZ_WRF/tools 19 # cdo HOME 20 cdoHOME = /home/lluis/bin/gcc_cdo/1.6.4rc6/bin/cdo 19 21 20 22 # Srcatch: should be any previous work removed and start from the scratch? 21 scratch = false23 scratch = true 22 24 23 25 # Scratch files: should be any files previous work removed and start from the scratch? … … 34 36 35 37 # Debug 36 debug =false38 debug = true 37 39 38 40 # Folder with the files … … 85 87 #vartmean = tas:uas:vas:ps:pr:pracc:rsds:prw:evspsbl:hfss:hfls:hurs:huss:zmla:hufs:wakes:lwakeh:stherm:zmaxth:clt:cll:clm:clh:prc:prls:bils:wss 86 88 #varxmean = ta:ua:va:hur:hurs:tas:wss:ps 87 #vardiff = tas|last:tas|xmean:tas|tmean88 89 #varpinterp = ta:ua:va:hur:ws:hus 89 90 #varcombo = ta;pinterp@last@xmean:ua;pinterp@last@xmean:va;pinterp@last@xmean:hur;pinterp@last@xmean:ws;pinterp@turb@xmean:hus;pinterp@turb@xmean … … 95 96 varcombo = ta;pinterp@last@xmean:ua;pinterp@last@xmean:va;pinterp@last@xmean:hur;pinterp@last@xmean:ws;pinterp@turb@xmean:hus;pinterp@turb@xmean 96 97 97 vardiff = tas|last:tas|xmean:tas|tmean:wss|last:wss|xmean:wss|tmean 98 vardiff = tas|last:tas|xmean:tas|tmean:wss|last:wss|xmean:wss|tmean:ua|pinterp@last@xmean:va|pinterp@last@xmean 98 99 99 100 # Operations which attach 'mean' at the end of the variable name 100 varmeanname= 'Lmean:lmean:tmean:xmean:ymean'101 varmeanname=Lmean:lmean:tmean:xmean:ymean 101 102 102 103 # Pressure levels … … 106 107 plevels = 100000.:97500.:95000.:92500.:90000.:85000.:80000.:75000.:70000.:65000.:60000.:55000.:50000.:45000.:40000.:35000.:30000.:25000.:20000.:15000.:10000.:5000.:2500.:1000.:500.:250. 107 108 109 # Common projection 110 # File with the information of the projection to be used for inter-model differences 111 # File obtained from 'cdo griddes' 112 commonproj = WaqualCommon.griddes 108 113 109 114 # Kind of plots … … 119 124 #drawplots = shadcont2Dsfc:shadconthovmsfc:sahdcont2Dzsec 120 125 drawplots = shadcont2Dzsec 121 drawdiffplots = shadcont2Dsfc 126 drawdiffplots = shadcont2Dsfc:shadconthovmsfc:sahdcont2Dzsec 122 127 123 128 # Figures which can be made directly without another model/experiment output … … 126 131 pltshadcont2Dsfc = huss|tmean#tas|tmean:vas|tmean#uas|tmean:ps|tmean#wss|tmean:pr|tmean#rsds|tmean:prw|tmean#clt|tmean:hfls|tmean#hfss|tmean:evspsbl|tmean#bils|tmean:zmaxth|tmean#stherm|tmean:wakeh|tmean#wakes|tmean:zmaxth|tmean#stherm|tmean:prls|tmean#prc|tmean:clt|tmean#cll|tmean:clm|tmean#clh|tmean:hurs|tmean#zmla|tmean:huss|last#tas|last:vas|last#uas|last:ps|last#wss|tmean:pr|last#rsds|last:prw|last#clt|last:hfls|last#hfss|last:evspsbl|last#bils|last:zmaxth|last#stherm|last:wakeh|last#wakes|last:zmaxth|last#stherm|last:prls|last#prc|last:clt|last#cll|last:clm|last#clh|last:hurs|last#zmla|last 127 132 pltshadconthovmsfc = hurs|xmean#tas|xmean:wss|xmean#ps|xmean 128 pltshadcont2Dzsec =ua|pinterp@last@xmean#va|pinterp@last@xmean:hur|pinterp@last@xmean#ta|pinterp@last@xmean:ws|pinterp@turb@xmean#hus|pinterp@turb@xmean133 pltshadcont2Dzsec = ua|pinterp@last@xmean#va|pinterp@last@xmean:hur|pinterp@last@xmean#ta|pinterp@last@xmean:ws|pinterp@turb@xmean#hus|pinterp@turb@xmean 129 134 130 pltdiffshadcont2Dsfc = tas|tmean#wss|tmean:tas|last#wss|last 135 pltdiffshadcont2Dsfc = tas|tmean#wss|tmean:wss|last#tas|last 136 pltdiffshadconthovmsfc = wss|xmean#tas|xmean 137 pltdiffshadcont2Dzsec = ua|pinterp@last@xmean#va|pinterp@last@xmean 131 138 132 139 # Specific variable-statistisc graphic parameters (if no value is given, they will be retrieved from 'variables_values.dat') … … 142 149 # [colorcnt]: color for the countor lines 143 150 specificvarplot = cll|last|shadcont2Dsfc|0.|1.|gist_gray|%g|black:clh|last|shadcont2Dsfc|0.|1.|gist_gray|%g|black:husturbmean|pinterp@turb@xmean|shadcont2Dzsec|0.|1.e-6|Blues|%g|black 144 diffspecificvarplot = tas|tmean|shadcont2Dsfc|-20.|20. seismic|%g|black:wss|tmean|shadcont2Dsfc|-30.|30.|seismic|%g|black:tas|last|shadcont2Dsfc|-20.|20.seismic|%g|black:wss|last|shadcont2Dsfc|-30.|30.|seismic|%g|black151 diffspecificvarplot = tas|tmean|shadcont2Dsfc|-20.|20.|seismic|%g|black:wss|tmean|shadcont2Dsfc|-30.|30.|seismic|%g|black:tas|last|shadcont2Dsfc|-20.|20.|seismic|%g|black:wss|last|shadcont2Dsfc|-30.|30.|seismic|%g|black 145 152 146 153 # Figures output kind
Note: See TracChangeset
for help on using the changeset viewer.