source: lmdz_wrf/trunk/tools/documentation/plotting/2Dshad_time.html @ 1553

Last change on this file since 1553 was 1403, checked in by lfita, 8 years ago

Fixing issues and introducing $pyHOME

File size: 5.5 KB
Line 
1<HTML>
2  <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/>
4    <TITLE>PyNCplot: plotting 2D shadow_time</TITLE>
5    <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/>
6  </HEAD>
7
8  </HEAD>
9  <BODY>
10    <DIV CLASS="valheader">
11      2D shadow time plot
12    </DIV>
13    <DIV CLASS="valimg">
14      Plotting a 2D field with shading where one of the acis has temporal values
15      <IMG WIDTH="100%" SRC="figs/hurs_Blues_auto_time.png"></IMG>
16    </DIV>
17    <DIV CLASS="valhelp">
18    draw_2D_shad_time(ncfile, values, varn)<BR>
19    &nbsp;&nbsp;ncfile= file to use<BR>
20    &nbsp;&nbsp;values=[vnamefs]~[dimvals]~[dimxvn]~[dimyvn]~[dimvfmt]~[colorbarvals]~[sminv],[smaxv]~[figt]~<BR>
21    &nbsp;&nbsp;[kindfig]~[reverse]~[timevals]~[close]<BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;[vnamefs]: Name in the figure of the variable to be shaded<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[dimvals]: ',' list of [dimname]|[value] telling at which dimension of the <BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;variable a given value is required (-1, all the length, [beg]@[end] for an interval)<BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;[dimx/yvn]: name of the variables with the values of the final dimensions (x,y)  ('WRFtime' for WRF times)<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;[dimvfmt]=[dvs],[dvf],[Ndv],[ordv]: format of the values for the non-temporal axis (or 'auto')<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dvs]: style of non-temporal axis ('auto' for 'pretty')<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nfix', values computed at even 'Ndx'<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Vfix', values computed at even 'Ndx' increments<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dvf]: format of the labels at the x-axis ('auto' for '%5g')<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndv]: Number of ticks at the x-axis ('auto' for 5)<BR>
33    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordv]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;[colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarn]: name of the color bar<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR>
37    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;[smin/axv]: minimum and maximum value for the shading or:<BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Srange': for full range<BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundminmax@val': for min*val,max*val<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;percentile_(100-val)-median)<BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;percentile_(100-val)-median)<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;[figt]: title of the figure ('|' for spaces)<BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;[kindfig]: kind of figure<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;[reverse]: Transformation of the values<BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'transpose': reverse the axes (x-->y, y-->x)<BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'flip'@[x/y]: flip the axis x or y<BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;[timevals]: [timen]|[units]|[kind]|[tfmt]|[label]|[timeaxis] time labels characteristics<BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;[timen]; name of the time variable ('WRFtime' for WRF times)<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;[units]; units string according to CF conventions ([tunits] since <BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces)<BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;[kind]; kind of output<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nval': according to a given number of values as 'Nval',[Nval]<BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'exct': according to an exact time unit as 'exct',[tunit]; <BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR>
62    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'l': milisecond<BR>
63    &nbsp;&nbsp;&nbsp;&nbsp;[tfmt]; desired format<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;[label]; label at the graph ('!' for spaces)<BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;[close]: should figure be closed (finished)<BR>
66    &nbsp;&nbsp;varn= [varsn] name of the variable to plot with shading<BR>
67    </DIV>
68    <DIV CLASS="valins">
69      $ python ${pyHOME}/drawing.py -o draw_2D_shad_time -f wrfout_d01_2001-11-11_00:00:00 -S 'hurs~west_east|-1,south_north|27,Time|-1~XLONG~WRFtime~auto~Blues,auto,auto~Srange,Srange~tas|evolution|at|south_north=27~png~None~WRFtime|hours!since!1949-12-01|exct,1,h|$%d^{%H}$|date!($[DD]^{[HH]}$)~True' -v Q2
70    </DIV>
71  </BODY>
72</HTML>
73
Note: See TracBrowser for help on using the repository browser.