Changeset 956 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 25, 2016, 7:19:44 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/model_graphics.bash
r937 r956 713 713 # temporal mean values 714 714 'tmean') 715 vals='time|-1,time,mean,lon:lat:'${vdnz}':time '715 vals='time|-1,time,mean,lon:lat:'${vdnz}':time:pres' 716 716 dims='time@time,'${dnz}'@'${vdnz}',lat@lat,lon@lon' 717 717 … … 734 734 # x-axis mean values 735 735 'xmean') 736 vals='lon|-1,lon,mean,lon:lat:'${vdnz}':time '736 vals='lon|-1,lon,mean,lon:lat:'${vdnz}':time:pres' 737 737 dims='time@time,'${dnz}'@'${vdnz}',lat@lat,lon@lon' 738 738 … … 755 755 # y-axis mean values 756 756 'ymean') 757 vals='lat|-1,lat,mean,lon:lat:'${vdnz}':time '757 vals='lat|-1,lat,mean,lon:lat:'${vdnz}':time:pres' 758 758 dims='time@time,'${dnz}'@'${vdnz}',lat@lat,lon@lon' 759 759 … … 795 795 # diffmap2Dsfc: 2D map of surface differences values of 1 variable 796 796 # diffmap2Dz: 2D map of 3D differences values of 1 variable 797 # shadconthovmsfc: Hovmoeller diagrams of 2 variable at the surface in shadow and the other in contourn798 797 # map2Dsfc: 2D map of surface values of 1 variable 799 798 # map3D: 2D map of 3D values of 1 variable 799 # shadconthovmsfc: Hovmoeller diagrams of 2 variable at the surface in shadow and the other in contourn 800 800 # shadcont2Dsfc: 2D map of shadow (1st variable) and countour (2nd variable) [stvar1]#[stvar2] 801 # shadcont2Dzsec: 2D map of vertical section of 2 variables one in shadow and the other in contourn 801 802 # 802 803 # ':' separated list of statitsics variable values are given as: [var]|[kind(including combo values)] … … 838 839 varn=`echo ${varkind} | tr '|' ' ' | awk '{print $1}'` 839 840 kind=`echo ${varkind} | tr '|' ' ' | awk '{print $2}'` 841 840 842 # Do we have processed the given variable? 841 843 nfiles=`ls -1 ${odir}/${varn}_${headf}*.nc | wc -l | awk '{print $1}'` … … 845 847 fi 846 848 847 if $(isInlist ${varmeanname} ${kind}); then 848 vn=${varn}'mean' 849 Nopers=`echo ${kind} | tr '@' ' ' | wc -w | awk '{print $1}'` 850 if test ${Nopers} -eq 1; then 851 if $(isInlist ${varmeanname} ${kind}); then 852 vn=${varn}'mean' 853 else 854 vn=${varn} 855 fi 849 856 else 850 vn=${varn} 857 oprs=`echo ${kind} | tr '@' ' '` 858 for op in ${oprs}; do 859 if $(isInlist ${varmeanname} ${op}); then 860 vn=${varn}'mean' 861 break 862 else 863 vn=${varn} 864 fi 865 done 851 866 fi 852 867 filen=`stats_filename ${varn} ${kind} ${headf}` … … 855 870 856 871 if test ${iv} -eq 1; then 857 varkinds=${varkind} 872 if test ${Nopers} -gt 1; then 873 varkinds=${varn}'|('$(echo ${kind} | tr '@' '|')')' 874 else 875 varkinds=${varkind} 876 fi 858 877 CFvars=${varn} 859 878 varinfilen=${vn} … … 865 884 fi 866 885 else 867 varkinds=${varkinds}':'${varkind} 886 if test ${Nopers} -gt 1; then 887 varkinds=${varkinds}':'${varn}'|('$(echo ${kind} | tr '@' '|')')' 888 else 889 varkinds=${varkinds}':'${varkind} 890 fi 868 891 CFvars=${CFvars}':'${varn} 869 892 varinfilen=${varinfilen}':'${vn} … … 872 895 fi 873 896 874 figname=${figname}'_'${vn}'-'$ {kind}897 figname=${figname}'_'${vn}'-'$(echo ${kind} | tr '@' '-') 875 898 876 899 # Getting plot variable configuration … … 905 928 fi 906 929 907 # Graphical param ters for each variable in the plot930 # Graphical parameters for each variable in the plot 908 931 if test ${iv} -eq 1; then 909 932 figvarparam=${minval}'|'${maxval}'|'${colorbar}'|'${cntformat}'|'${colorcnt} … … 968 991 # keeping all figures 969 992 plotins="python "${pyHOME}"/drawing.py -f "${figfs}" -o draw_2D_shad_cont " 970 plotins=${plotins}"-S '"${graphvals}"' -v "$(echo ${varinfile b} | tr ':' ',')993 plotins=${plotins}"-S '"${graphvals}"' -v "$(echo ${varinfilen} | tr ':' ',') 971 994 echo " " >> ${odir}/all_figures.inf 972 995 echo "#"$(echo $f{igtit} | tr '|' ' ') >> ${odir}/all_figures.inf 973 996 echo ${plotins} >> ${odir}/all_figures.inf 974 975 # exit976 997 ;; 977 998 'shadconthovmsfc') … … 1008 1029 awk '{print $4}'` 1009 1030 1010 # if test ${spacedim} = 'lon'; then1011 # dims='lon|-1,time|-1:lon|-1,time|-1:time:lon'1012 # else1013 # dims='lat|-1,time|-1:lat|-1,time|-1:time:lat'1014 # fi1015 1016 1031 graphvals=$(echo ${CFvars} | tr ':' ',') 1017 1032 graphvals=${shdstdn}','${cntstdn}';'${dims}';' … … 1031 1046 echo "#"$(echo $f{igtit} | tr '|' ' ') >> ${odir}/all_figures.inf 1032 1047 echo ${plotins} >> ${odir}/all_figures.inf 1033 1034 # exit 1048 ;; 1049 'shadcont2Dzsec') 1050 shdstdn=`echo ${CFvars} | tr ':' ' ' | awk '{print $1}'` 1051 cntstdn=`echo ${CFvars} | tr ':' ' ' | awk '{print $2}'` 1052 # It is assumed that if the space variable is 'lon': is desired a (lon, pres) plot 1053 # it it is 'lat': then (pres, lat) plot 1054 dimspace='xxx' 1055 if $( isInlist ${vardims} 'lon'); then 1056 spacedim='lon' 1057 figtit=${mod}'|'${exp}'|mean|longitudinal|vertical|cross|section|of|' 1058 figtit=${figtit}${shdstdn}'|&|'${cntstdn} 1059 else 1060 spacedim='lat' 1061 figtit=${mod}'|'${exp}'|mean|meridional|vertical|cross|section|of|' 1062 figtit=${figtit}${shdstdn}'|&|'${cntstdn} 1063 fi 1064 reverse='flip@y' 1065 dims=${spacedim}'|-1,pres|-1:'${spacedim}'|-1,pres|-1:'${spacedim}':pres' 1066 1067 figtit=${mod}'|'${exp}'|'$(echo ${varkinds} | tr ':' '|') 1068 figfs=`echo ${figfiles} | tr ':' ','` 1069 srange=`echo ${figvarparam} | tr ':' ' ' | awk '{print $1}' | tr '|' ' ' | \ 1070 awk '{print $1","$2}'` 1071 cbar=`echo ${figvarparam} | tr ':' ' ' | awk '{print $1}' | tr '|' ' ' | \ 1072 awk '{print $3}'` 1073 crange=`echo ${figvarparam} | tr ':' ' ' | awk '{print $2}' | tr '|' ' ' | \ 1074 awk '{print $1","$2}'` 1075 cline=`echo ${figvarparam} | tr ':' ' ' | awk '{print $2}' | tr '|' ' ' | \ 1076 awk '{print $5}'` 1077 cfmt=`echo ${figvarparam} | tr ':' ' ' | awk '{print $2}' | tr '|' ' ' | \ 1078 awk '{print $4}'` 1079 1080 graphvals=$(echo ${CFvars} | tr ':' ',') 1081 graphvals=${graphvals}':'${dims}':'${cbar}':fixc,' 1082 graphvals=${graphvals}${cline}':'${cfmt}':'${srange}':'${crange}',9:' 1083 graphvals=${graphvals}${figtit}':'${kindfig}':'${reverse}':None' 1084 1085 pyout=`python ${pyHOME}/drawing.py -f ${figfs} -o draw_2D_shad_cont \ 1086 -S ${graphvals} -v $(echo ${varinfilen} | tr ':' ',')` 1087 pyn=$? 1088 Spyout=`echo ${pyout} | tr '\n' '#' | tr ' ' '!'` 1089 ferrmsg ${pyn} ${fname} "python!'draw_2D_shad_cont'!failed#"${Spyout} 1090 mv 2Dfields_shadow-contour.${kindfig} ${figname} 1091 1092 # keeping all figures 1093 plotins="python "${pyHOME}"/drawing.py -f "${figfs}" -o draw_2D_shad_cont " 1094 plotins=${plotins}"-S '"${graphvals}"' -v "$(echo ${varinfilen} | tr ':' ',') 1095 echo " " >> ${odir}/all_figures.inf 1096 echo "#"$(echo $f{igtit} | tr '|' ' ') >> ${odir}/all_figures.inf 1097 echo ${plotins} >> ${odir}/all_figures.inf 1035 1098 ;; 1036 1099 *) … … 1186 1249 fi 1187 1250 1251 if ${addfiles}; then 1252 rm ${owdir}/varcompute.inf >& /dev/null 1253 fi 1188 1254 1189 1255 if test ! -f ${owdir}/varcompute.inf; then … … 1421 1487 echo " "${main}": Plotting direct figures ..." 1422 1488 if ${figscratch}; then rm directplotsdraw.inf; fi 1489 if ${addfigures}; then rm directplotsdraw.inf; fi 1490 1423 1491 if test ! -f directplotsdraw.inf; then 1424 1492 drwplts=`echo ${drawplots} | tr ':' ' '` … … 1439 1507 'shadconthovmsfc') 1440 1508 plts=${pltshadconthovmsfc} 1509 ;; 1510 'shadcont2Dzsec') 1511 plts=${pltshadcont2Dzsec} 1441 1512 ;; 1442 1513 *) -
trunk/tools/model_graphics_template.dat
r937 r956 31 31 32 32 # Have new figures been added and do they need to be drawn? 33 addfi les = false33 addfigures = true 34 34 35 35 # Debug … … 98 98 # diffmap2Dsfc: 2D map of surface differences values of 1 variable 99 99 # diffmap2Dz: 2D map of 3D differences values of 1 variable 100 # shadconthovmsfc: Hovmoeller diagrams of 2 variables at the surface in shadow and the other in contourn101 100 # map2Dsfc: 2D map of surface values of 1 variable 102 # map3D: 2D map of 3D values of 1 variable101 # shadconthovmsfc: Hovmoeller diagrams of 2 variables at the surface one in shadow and the other in contourn 103 102 # shadcont2Dsfc: 2D map of shadow (1st variable) and countour (2nd variable) [stvar1]#[stvar2] 103 # shadcont2Dzsec: 2D map of vertical section of 2 variables one in shadow and the other in contourn 104 104 # 105 105 # ':' separated list of statitsics variable values are given as: [var]|[kind(including combo values)] 106 106 # in figures with more than 1 variable, use '#' to separate them 107 drawplots = shadcont2Dsfc:shadconthovmsfc 107 #drawplots = shadcont2Dsfc:shadconthovmsfc:sahdcont2Dzsec 108 drawplots = shadcont2Dzsec 108 109 109 110 # Figures which can be made directly without another model/experiment output 110 directplots = shadconthovmsfc: map2Dsfc:map3D:shadcont2Dsfc111 directplots = shadconthovmsfc:shadcont2Dsfc:shadcont2Dzsec 111 112 112 113 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 113 114 pltshadconthovmsfc = hurs|xmean#tas|xmean:wss|xmean#ps|xmean 115 pltshadcont2Dzsec=ua|pinterp@last@xmean#va|pinterp@last@xmean:hur|pinterp@last@xmean#ta|pinterp@last@xmean 114 116 115 pltdiffmap2Dsfc = uas:vas:ps:pr116 117 pltdiffmap2Dz = uapxmean:vapxmean:tapxmean:huspxmean 117 118
Note: See TracChangeset
for help on using the changeset viewer.