source: lmdz_wrf/trunk/tools/documentation/plotting/2Dshad_contdisc_time.html @ 2775

Last change on this file since 2775 was 2128, checked in by lfita, 7 years ago

Adding:

  • Documentation for `draw_2D_shad_contdisc'
  • Documentation for `draw_multiWindRose'
  • Documentation for `draw_stations_map'
  • Documentation for `draw_WRFeta_levels'
  • Adding 'Ncol' and 'runmean' into `draw_lines_time'
  • Documentation for `draw_2Dshad_map'
File size: 8.5 KB
Line 
1<HTML>
2  <HEAD>
3    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/>
4    <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/>
5  </HEAD>
6
7  </HEAD>
8  <BODY>
9    <DIV CLASS="valheader">
10      2D shadow plot
11    </DIV>
12    <DIV CLASS="valimg">
13      Plotting one continuous fields with shading and another discrete one with points with a time-axis
14      <IMG WIDTH="100%" SRC="figs/2Dshad_obs-sim_comparison_time.png"></IMG>
15    </DIV>
16    <DIV CLASS="valhelp">
17    draw_2D_shad_contdisc_time(ncfiles, values)<BR>
18    &nbsp;&nbsp;  ncfiles= [contfilen];[contvarn];[dimtvarn];[dimvvarn];[dimvals]@[discfilen];<BR>
19    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[discvarn];[dimtvarn];[dimvvarn];[dimvals] files and variables to use<BR>
20    &nbsp;&nbsp;&nbsp;&nbsp;[contfilen]: name of the file with the continuous varible<BR>
21    &nbsp;&nbsp;&nbsp;&nbsp;[contvarn]: name of the continuos variable<BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;[dimtvarn]: name of the variable with values for the time-dimension<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[dimvvarn]: name of the variable with values for the variable-dimension<BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;[dimvals]: ',' list of [dimname]|[value] values to slice the variable:<BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [integer]: which value of the dimension<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -1: all along the dimension<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -9: last value of the dimension<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE, no dim name all the dimension size<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;[discfilen]: name of the file with the discrete varible<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;[discvarn]: name of the discrete variable<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;* NOTE: limits of the graph will be computed from the continuous variable<BR>
33    &nbsp;&nbsp;  values=[vnamefs];[varaxis];[timevals];[dimvfmt];[colorbarvals];[sminv],[smaxv];<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;   [discvals];[figt];[kindfig];[reverse];[mapv];[close]<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;[vnamefs]: Name in the figure of the variable to be shaded<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;[varaxis]: axis in the figure for the variable-axis ('x' or 'y')<BR>
37    &nbsp;&nbsp;&nbsp;&nbsp;[timevals]: [units]|[kind]|[tfmt]|[label] time labels characteristics<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[units]: units string according to CF conventions ([tunits] since <BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces), <BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'auto' for minutes!since!1949-12-01!00:00:00<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[kind]: kind of output<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nval': according to a given number of values as 'Nval',[Nval]<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'exct': according to an exact time unit as 'exct',[tunit]; <BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   'l': milisecond<BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[tfmt]: desired format (combination of 'C'-style values and LaTeX)<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[label]: label at the graph ('!' for spaces, combination of 'C'-style <BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values and LaTeX)<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;[dimvfmt]=[[dvs],[dvf],[Ndv],[ordv]: format of the values at variable-axis <BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(or 'auto')<BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dvs]: style of variable-axis ('auto' for 'pretty')<BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nfix', values computed at even 'Ndx'<BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Vfix', values computed at even 'Ndx' increments<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dvf]: format of the labels at the var-axis ('auto' for '%5g')<BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndv]: Number of ticks at the var-axis ('auto' for 5)<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordv]: angle of orientation of ticks at the var-axis ('auto' for horizontal)<BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;[colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarn]: name of the color bar<BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR>
62    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[orientation]: orientation of the colorbar ('vertical' ['auto'], 'horizontal')<BR>
63    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE: single 'auto' for 'rainbow,%6g,vertical'<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;[smin/axv]: minimum and maximum values for the shading or string for each for:<BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Srange': for full range<BR>
66    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundmean@val': for mean-xtrm,mean+xtrm where <BR>
67    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xtrm = np.min(mean-min@val,max@val-mean)<BR>
68    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundminmax@val': for min*val,max*val<BR>
69    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundpercentile@val': for median-xtrm,median+xtrm where <BR>
70    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR>
71    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR>
72    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smedian@val': for -xtrm,xtrm where <BR>
73    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtrm = np.min(median-min@val,max@val-median)<BR>
74    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Spercentile@val': for -xtrm,xtrm where <BR>
75    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtrm = np.min(median-percentile_(val),percentile_(100-val)-median)<BR>
76    &nbsp;&nbsp;&nbsp;&nbsp;[discvals]= [type],[size],[lwidth],[lcol] characteristics of the points for the discrete field<BR>
77    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[type]: type of point. Any marker from matoplib must be filled !<BR>
78    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[size]: size of point <BR>
79    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[lwidth]: width of the line around the point<BR>
80    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[lcol]: color of the line around the point<BR>
81    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'auto': for [type]='o', [size]=5, [lwdith]=0.25, [lcol]='#000000'<BR>
82    &nbsp;&nbsp;&nbsp;&nbsp;[figt]: title of the figure ('!' for spaces)<BR>
83    &nbsp;&nbsp;&nbsp;&nbsp;[kindfig]: kind of figure output (ps, png, pdf)<BR>
84    &nbsp;&nbsp;&nbsp;&nbsp;[reverse]: Transformation of the values to plot<BR>
85    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'transpose': reverse the axes (x-->y, y-->x)<BR>
86    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'flip'@[x/y]: flip the axis x or y<BR>
87    &nbsp;&nbsp;&nbsp;&nbsp;[mapv]: map characteristics: [proj],[res]<BR>
88    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;see full documentation: http://matplotlib.org/basemap/<BR>
89    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[proj]: projection<BR>
90    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'cyl', cilindric<BR>
91    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'lcc', lambert conformal<BR>
92    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[res]: resolution of the coastaline data:<BR>
93    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'c', crude<BR>
94    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'l', low<BR>
95    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'i', intermediate<BR>
96    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'h', high<BR>
97    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'f', full<BR>
98    &nbsp;&nbsp;&nbsp;&nbsp;[close]: Whether figure should be finished or not<BR>
99    </DIV>
100    <DIV CLASS="valins">
101      $ python ${pyHOME}/drawing.py -o draw_2D_shad_contdisc_time -f 'simout_snddiags.nc;ta;time;pres;<BR>
102&nbsp;&nbsp;time|-1,pres|-1@UWyoming_snd_87576.nc;ta;time;pres;time|-1,pres|-1' -S 'ta;y;auto|exct,12,h|%d$^{%H}$|<BR>
103&nbsp;&nbsp;time!($[DD]^{[HH]}$);Vfix,auto,50.,auto;auto;Srange,Srange;auto;obs!&!sim!Ezeiza!airport!sounding;png;<BR>
104&nbsp;&nbsp;flip@y;None;yes'
105    </DIV>
106  </BODY>
107</HTML>
108
Note: See TracBrowser for help on using the repository browser.