Changeset 2031 in lmdz_wrf
- Timestamp:
- Aug 6, 2018, 5:10:39 PM (7 years ago)
- Location:
- trunk/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r2024 r2031 9918 9918 'linepoint': consecutive (time, height, level, ...) line-point angle and speed values. Three different species 9919 9919 'multicol': line-marker color changing according to a third variable [extravarn] 9920 values: [extravarn];[lines];[markers];[ colbar];[Nang]9920 values: [extravarn];[lines];[markers];[freqmarkers];[colbar];[Nang] 9921 9921 'multicoltime': line-marker color changing according to a temporal variable [extravarn] 9922 9922 values: [extravarn];[lines];[markers];[colbar];[Nang];[timekind];[timefmt];[timelabel] … … 9934 9934 [lines]: '@' separated list of type of lines (matplotlib ref) 9935 9935 [markers]: '@' separated list of type of markers to use (matplotlib ref) 9936 [freqmarkers]: '@' separated list of frequency of drawing markers ('auto' for every 10) 9936 9937 [cols] = '@' separated list of colors ('#[RR][GG][BB]) 9937 9938 [colbar]: name of the colorbar ('auto' for 'spectral_r') … … 9997 9998 if lpvals[0] == 'linepoint': 9998 9999 if lkind == 'multicol': 9999 if len(lpvals) != 7:10000 if len(lpvals) != 8: 10000 10001 print errormsg 10001 10002 print ' ' + fname + ": line-point kind '" + lkind + "' requires " + \ 10002 10003 "6 values !!" 10003 print " 'multiecol';[extravarn];[line];[marker];[colbar];[Nang]" 10004 print " 'multiecol';[extravarn];[line];[marker];[freqmarker];" + \ 10005 "[colbar];[Nang]" 10004 10006 print ' provided:', lpvals 10005 10007 quit(-1) -
trunk/tools/drawing_tools.py
r2014 r2031 8855 8855 lpvals[>=2]: specific values for the specie Wind Rose 8856 8856 'linepoint';[kind];[val1];[...;[valN]]: consecutive (time, height, level, ...) line-point angle and speed values 8857 'multicol';[extravarn];[lines];[markers];[ colbar]8857 'multicol';[extravarn];[lines];[markers];[freqmarkers];[colbar] 8858 8858 'multicoltime';[extravarn];[lines];[markers];[colbar];[timekind];[timefmt];[timelabel] 8859 8859 'singlecol';[lines];[markers];[cols] … … 8896 8896 if lpvals[0] == 'linepoint': 8897 8897 if lkind == 'multicol': 8898 colbar = gen.auto_val(lpvals[ 5],'spectral_r')8899 Nang = gen.auto_val(lpvals[ 6],8)8898 colbar = gen.auto_val(lpvals[6],'spectral_r') 8899 Nang = gen.auto_val(lpvals[7],8) 8900 8900 # Setting up colors for each label 8901 8901 # From: http://stackoverflow.com/questions/15235630/matplotlib-pick-up-one-color-associated-to-one-value-in-a-colorbar … … 8914 8914 ltyps = gen.auto_val_list(lpvals[3].split('@'), Nsnds, linekindsauto) 8915 8915 lmrks = gen.auto_val_list(lpvals[4].split('@'), Nsnds, pointkindsauto) 8916 lfrqs = gen.auto_val_list(lpvals[5].split('@'), Nsnds, \ 8917 np.ones((Nsnds), dtype=int)*10) 8916 8918 8917 8919 for isnds in range(Nsnds): … … 8921 8923 ltyp = ltyps[isnds] 8922 8924 lmrk = lmrks[isnds] 8925 lfrq = lfrqs[isnds] 8923 8926 8924 8927 sndS = labs[isnds] … … 8930 8933 plt.plot([ang[ie], ang[ie+1]], [speed[ie], speed[ie+1]], \ 8931 8934 ltyp, marker=lmrk, color=labcol, label=gen.latex_text(sndS)) 8935 8936 if np.mod(ie,lfrq) == 0: 8937 plt.plot([ang[ie], ang[ie+1]], [speed[ie], speed[ie+1]], \ 8938 ltyp, marker=lmrk, color=labcol) 8932 8939 else: 8933 8940 plt.plot([ang[ie], ang[ie+1]], [speed[ie], speed[ie+1]], \ 8934 ltyp, marker=lmrk,color=labcol)8941 ltyp, color=labcol) 8935 8942 8936 8943 ie = dime-1 -
trunk/tools/obs-sim_Comparison.bash
r2028 r2031 913 913 figheader=`echo ${valuesfig} | tr '%' ' ' | awk '{print $9}'` 914 914 915 values='linepoint;multicol;pres;-;'${lmark}'; spectral;auto:'${labs}':'915 values='linepoint;multicol;pres;-;'${lmark}';auto;spectral;auto:'${labs}':' 916 916 values=${values}'WindRose!obs!,!sim!comparison!at!'${stid}'!on!'${timeS}'!UTC:' 917 917 values=${values}${kfig}':auto:''True' … … 932 932 echo "* "${ofign} >> ${ofilefigs} 933 933 echo python ${pyHOME}/drawing.py -o draw_multiWindRose -f "'"${files}"'" \ 934 -S "'"${values}"'" -v ${sfcv}>> ${ofilefigs}934 -S "'"${values}"'" >> ${ofilefigs} 935 935 echo " "${ofign} >> ${ofilefigs} 936 936 fi … … 1465 1465 fstats=`python $pyHOME/nc_var.py -o field_stats -S full,1.e+20,None \ 1466 1466 -f ${simsndptf} -v pres | grep MAT | grep pres` 1467 nsimpres=`echo ${fstats} | awk '{printf ("%d",$3 *1000)}'`1467 nsimpres=`echo ${fstats} | awk '{printf ("%d",$3)}'` 1468 1468 fi 1469 1469 … … 1471 1471 obspres=`python $pyHOME/nc_var.py -o varout -f ${obsuavaf} -S time:${it} \ 1472 1472 -v pres | awk '{print $2}' | tr '\n' ':'` 1473 vals=${obspres}',threshold,:,'${nsimpres} 1473 Lobspres1=`expr length ${obspres} | awk '{print $1-1}'` 1474 vals=${obspres:0:${Lobspres1}}',threshold,:,'${nsimpres} 1474 1475 kobs=`python ${pyHOME}/generic.py -o inf_operSlist -S ${vals}` 1475 1476 if test $? -ne 0; then … … 1479 1480 exit 1480 1481 fi 1481 echo " obs level of sim npres "${nsimpres}": "${kobs} 1482 vals=${obspres:0:${Lobspres1}}',getvalue,:,'${kobs} 1483 onpres=`python ${pyHOME}/generic.py -o inf_operSlist -S ${vals}` 1484 echo " obs level of sim npres "${nsimpres}": "${kobs}" "${onpres} 1482 1485 1483 1486 mWRcomplabs='obs,'${expn}
Note: See TracChangeset
for help on using the changeset viewer.