Changeset 1489 in lmdz_wrf
- Timestamp:
- Apr 3, 2017, 8:08:50 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/documentation/plotting/Nlines_time.html
r1403 r1489 34 34 [Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR> 35 35 [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> 36 [leglabels]: ',' separated list of names for the legend ('None', no legend '!' for spaces )<BR>36 [leglabels]: ',' separated list of names for the legend ('None', no legend '!' for spaces, '*' for no label)<BR> 37 37 [vartit]: name of the variable in the graph<BR> 38 38 [title]: title of the plot ('|' for spaces)<BR> -
trunk/tools/drawing.py
r1479 r1489 28 28 ## e.g. # python ../drawing.py -f ~/etudes/domains/SIRTA/geo_em.d01.nc,/home/lluis/etudes/domains/SIRTA/geo_em.d02.nc -o draw_topo_geogrid_boxes -S '0.,1500.:None:WRF!domain!centered!at!SIRTA:png:cyl,i:d01$_{15k}$,d02$_{3k}$:0|10:True' 29 29 ## e.g. # drawing.py -f ~/etudes/domains/MEDCORDEX/geo_em.d01.nc -o draw_2D_shad_cont -S 'height,landmask:Time|0:Time|0:XLONG_M:XLAT_M:terrain:fixc,k:None:0.,3000.:0,1,10:MEDCORDEX height & landmask:pdf:False:lcc,i' -v HGT_M,LANDMASK 30 ## e.g. # $ drawing.py -f WRF/current/hurs_wrfout_tturb_xmean_last.nc,WRF/micro1/hurs_wrfout_tturb_xmean_last.nc,WRF/micro2/hurs_wrfout_tturb_xmean_last.nc,WRF_LMDZ/AR40/hurs_wrfout_tturb_xmean_last.nc,WRF_LMDZ/NPv31/hurs_wrfout_tturb_xmean_last.nc,LMDZ/AR40/hurs_reproj-histins_tturb_xmean_last.nc,LMDZ/NPv31/hurs_reproj-histins_tturb_xmean_last.nc -o draw_lines -S 'lat:x:lat ($degrees\ North$):auto: wcurr,wmp1,wmp2,wlmdza,wlmdzb,lmdza,lmdzb:hurs:all model-experiments meridional hurs$_{[tturb\ xmean\ last]}$:0|auto:None:-:,:2.:2.:all:Nlines_hurs_wrfout_tturb-xmean-last:png:True' -v hursturbmean30 ## e.g. # $ drawing.py -f WRF/current/hurs_wrfout_tturb_xmean_last.nc,WRF/micro1/hurs_wrfout_tturb_xmean_last.nc,WRF/micro2/hurs_wrfout_tturb_xmean_last.nc,WRF_LMDZ/AR40/hurs_wrfout_tturb_xmean_last.nc,WRF_LMDZ/NPv31/hurs_wrfout_tturb_xmean_last.nc,LMDZ/AR40/hurs_reproj-histins_tturb_xmean_last.nc,LMDZ/NPv31/hurs_reproj-histins_tturb_xmean_last.nc -o draw_lines -S 'lat:x:lat ($degrees\ North$):auto:auto:wcurr,wmp1,wmp2,wlmdza,wlmdzb,lmdza,lmdzb:hurs:all model-experiments meridional hurs$_{[tturb\ xmean\ last]}$:0|auto:None:-:,:2.:2.:all:Nlines_hurs_wrfout_tturb-xmean-last:png:True' -v hursturbmean 31 31 ## e.g. # drawing.py -o draw_lines_time -f wrfout_d01_2001-11-11_00:00:00_west_east_B20-E20-I1_south_north_B20-E20-I1.nc,wrfout_d01_2001-11-11_00:00:00_west_east_B25-E25-I1_south_north_B25-E25-I1.nc,wrfout_d01_2001-11-11_00:00:00_west_east_B35-E35-I1_south_north_B35-E35-I1.nc -S 'WRFtime;y;time ([DD]${[HH]}$);auto;we=20$\times$sn=20,we=25$\times$sn=25,we=35$\times$sn=35;tas;tas|evolution|at|3|different|grid|points;None;time|hours!since!1949-12-01_00:00:00|exct,3,h|%d$^{%H}$;0|12;pdf;-;r,g,b;.;2.;2.;all;-1;True' -v T2 32 32 ## e.g. # drawing.py -o draw_Neighbourghood_evol -S 'vas:Time|-1|WRFtime,south_north|44|XLAT,west_east|88|XLONG:south_north,west_east:5:auto:time|($[DD]^{[HH]}$),time|($[DD]^{[HH]}$):exct,1,h|exct,3,h:$%d^{%H}$,$%d^{%H}$:5|pts|neighbourghood|temporal|evolution|on|2001|Nov.|at|x=88,|y=44:0.0,20.:rainbow,auto,auto:auto:png:vas_Neigh_evol:True' -f ~/PY/wrfout_d01_2001-11-11_00:00:00 -v V10 … … 2355 2355 [Ndy]: Number of ticks at the y-axis ('auto' for 5) 2356 2356 [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal) 2357 [leglabels]: ',' separated list of names for the legend ('None', no legend '!' for spaces )2357 [leglabels]: ',' separated list of names for the legend ('None', no legend '!' for spaces, '*' for no label) 2358 2358 [vartit]: name of the variable in the graph 2359 2359 [title]: title of the plot ('|' for spaces) … … 2439 2439 2440 2440 # Multiple variables? 2441 if varname 0.find(',') != -1:2442 varname = varname 0.split(',')2443 else: 2444 varname = [varname 0]2441 if varnames.find(',') != -1: 2442 varname = varnames.split(',') 2443 else: 2444 varname = [varnames] 2445 2445 2446 2446 # Multiple lines types? … … 2525 2525 timvals0 = timvalues 2526 2526 2527 print ' ' + fname2528 2527 ifn = 0 2529 2528 mintval = 1.e20 -
trunk/tools/drawing_tools.py
r1479 r1489 6280 6280 yaxv= list with the y-axis paramteres [style, format, number and orientation] 6281 6281 dtit= title for the common dimension 6282 linesn= names for the legend (None, no legend )6282 linesn= names for the legend (None, no legend, '!' for spaces, '*' for no label) 6283 6283 vtit= title for the vaxis 6284 6284 vunit= units of the vaxis … … 6381 6381 if vaxis == 'x': 6382 6382 for il in range(Ntraj): 6383 plt.plot(varvv[il], vardv[il], linekinds[il], marker=pointkinds[il], \ 6384 label=linesn[il], color=colvalues[il], linewidth=lwidths[il], \ 6385 markersize=psizes[il], markevery=ptf) 6383 if linesn[il] != '*': 6384 plt.plot(varvv[il], vardv[il], linekinds[il], marker=pointkinds[il], \ 6385 label=gen.latex_text(linesn[il].replace('!',' ')), \ 6386 color=colvalues[il], linewidth=lwidths[il], markersize=psizes[il], \ 6387 markevery=ptf) 6388 else: 6389 plt.plot(varvv[il], vardv[il], linekinds[il], marker=pointkinds[il], \ 6390 color=colvalues[il], linewidth=lwidths[il], markersize=psizes[il], \ 6391 markevery=ptf) 6386 6392 6387 6393 minvv = np.min(varvv[il]) … … 6395 6401 if maxdv > xtrmdv[1]: xtrmdv[1] = maxdv 6396 6402 6397 plt.xlabel( vtit + ' (' + vunit+ ')')6403 plt.xlabel(gen.latext_text(vtit) + ' (' + gen.latex_text(vunit) + ')') 6398 6404 plt.ylabel(dtit) 6399 6405 # plt.xlim(np.min(varTvv),np.max(varTvv)) … … 6416 6422 for il in range(Ntraj): 6417 6423 Nvals = len(vardv[il]) 6418 plt.plot(vardv[il], varvv[il], linekinds[il], marker=pointkinds[il], \ 6419 label=linesn[il], color=colvalues[il], linewidth=lwidths[il], \ 6420 markersize=psizes[il], markevery=ptf) 6424 if linesn[il] != '*': 6425 plt.plot(vardv[il], varvv[il], linekinds[il], marker=pointkinds[il], \ 6426 label=gen.latex_text(linesn[il]), color=colvalues[il], \ 6427 linewidth=lwidths[il], markersize=psizes[il], markevery=ptf) 6428 else: 6429 plt.plot(vardv[il], varvv[il], linekinds[il], marker=pointkinds[il], \ 6430 color=colvalues[il], linewidth=lwidths[il], markersize=psizes[il], \ 6431 markevery=ptf) 6421 6432 6422 6433 minvv = np.min(varvv[il]) … … 6431 6442 6432 6443 plt.xlabel(dtit) 6433 plt.ylabel( vtit+ ' (' + vunit + ')')6444 plt.ylabel(gen.latex_text(vtit) + ' (' + vunit + ')') 6434 6445 6435 6446 if vmin == 'auto':
Note: See TracChangeset
for help on using the changeset viewer.