Changeset 962 in lmdz_wrf for trunk/tools/model_graphics.bash
- Timestamp:
- Jun 27, 2016, 12:08:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.bash
r956 r962 575 575 # pinterp: pressure interpolation (to the given $plevels) 576 576 # tmean: temporal mean values 577 # turb: Taylor's turbulence decomposition value 577 578 # xmean: x-axis mean values 578 579 # ymean: y-axis mean values … … 731 732 732 733 varkeep=':'${CFvarn}'mean:timestats' 734 ;; 735 # turbulence values 736 'turb') 737 vals='turbulence|'${CFvarn} 738 dims='time@time,'${dnz}'@'${vdnz}',lat@lat,lon@lon,pres@pres' 739 740 pyout=`python ${pyHOME}/diagnostics.py -d ${dims} -v ${vals} -f ${cfiles}` 741 pyn=$? 742 Spyout=`echo ${pyout} | tr '\n' '#' | tr ' ' '!'` 743 ferrmsg ${pyn} ${fname} "python!'diagnostics'!'turbulence'!failed#"${Spyout} 744 mv diagnostics.nc ${filen} 745 746 # Keeping the operations 747 pyins="python "${pyHOME}"/diagnostics.py -d "${dims}" -v '"${vals} 748 pyins=${pyins}"' -f ${cfiles}" 749 echo " " >> ${odir}/all_statsvars.inf 750 echo "# ${CFvarn}" "${vark}" >> ${odir}/all_statsvars.inf 751 echo ${pyins} >> ${odir}/all_statsvars.inf 752 753 varkeep=':'${CFvarn}'turb' 733 754 ;; 734 755 # x-axis mean values … … 807 828 fname='draw_plot' 808 829 809 set -x810 811 830 plot=$1 812 831 odir=$2 … … 854 873 vn=${varn} 855 874 fi 875 if test ${op} = 'turb'; then 876 vn=${vn}'turb' 877 fi 856 878 else 857 879 oprs=`echo ${kind} | tr '@' ' '` 880 vn=${varn} 858 881 for op in ${oprs}; do 859 882 if $(isInlist ${varmeanname} ${op}); then 860 vn=${varn}'mean' 861 break 862 else 863 vn=${varn} 883 vn=${vn}'mean' 864 884 fi 885 if test ${op} = 'turb'; then 886 vn=${vn}'turb' 887 fi 865 888 done 866 889 fi … … 897 920 figname=${figname}'_'${vn}'-'$(echo ${kind} | tr '@' '-') 898 921 899 # Getting plot variable configuration 922 # Getting plot variable configuration (using variable name inside the file?) 900 923 specific=false 901 if $(isInlist ${specificvarplot} ${varn}); then 902 vals=`listfilter ${specificvarplot} ${varn}` 903 kvals=`listfilter ${specificvarplot} ${kind}` 924 # if $(isInlist ${specificvarplot} ${varn}); then 925 if test $(index_string ${specificvarplot} ${vn}) -ne -1; then 926 vals=`list_filter ${specificvarplot} ${vn}` 927 kvals=`list_filter ${specificvarplot} ${kind}` 904 928 Lkvals=`expr length ${kvals}'0'` 905 929 if test ${Lkvals} -gt 1; then 906 fkvals=`list filter ${kvals} ${kplot}`930 fkvals=`list_filter ${kvals} ${kplot}` 907 931 Lfkvals=`expr length ${fkvals}'0'` 908 932 if test ${Lfkvals} -gt 1; then … … 1438 1462 echo " "${main}": differences will be calculated when all the " \ 1439 1463 "model/experiments will be done !" 1440 elif test ${vark} = ' diff'; then1464 elif test ${vark} = 'combo'; then 1441 1465 echo " "${main}": combos will be calculated later when all the " \ 1442 1466 "variables will be done !" … … 1466 1490 diagv=`echo ${cvar} | tr '|' ' ' | awk '{print $5}'` 1467 1491 1492 # if $(index_string ${vark} 'pinterp') -ne -1; then 1493 # fhead=${fileh}'p' 1494 # else 1495 # fhead=${fileh} 1496 # fi 1468 1497 combs=`echo ${vco} | tr ';' ' ' | awk '{print $2}' | tr '@' ' '` 1469 1498 ifile=${CFv}_${fhead} 1470 1499 for comb in ${combs}; do 1471 combcvar=${CFv}'|'${comb}'|'${f ileh}'|'${modv}'|'${diagv}1500 combcvar=${CFv}'|'${comb}'|'${fhead}'|'${modv}'|'${diagv} 1472 1501 compute_statistics ${iwdir} ${ifile}.nc ${owdir} ${combcvar} ${moddims} \ 1473 1502 ${modvdims} ${filescratch} ${ifile}.nc 1474 1503 ifile=${ifile}_${comb} 1504 1505 # Adding 'surnames' to the variable's name 1506 if test ${comb} = 'turb'; then 1507 CFv=${CFv}'turb' 1508 fi 1509 if $(isInlist ${varmeanname} ${comb}); then 1510 CFv=${CFv}'mean' 1511 fi 1512 1475 1513 isc=`expr ${isc} + 1` 1476 1514 # End of combo
Note: See TracChangeset
for help on using the changeset viewer.