source: lmdz_wrf/trunk/tools/documentation/plotting/2Dshad_map.html @ 2818

Last change on this file since 2818 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.9 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 map
11    </DIV>
12    <DIV CLASS="valimg">
13      Plotting a 2D maksed field with shading on top of a map
14      <IMG WIDTH="100%" SRC="figs/shad-map_convini_Case6_era5_1a.png"></IMG>
15    </DIV>
16    <DIV CLASS="valhelp">
17    draw_2Dshad_map(ncfile, values, varn)<BR>
18    plotting a shadow field with a background map<BR>
19    &nbsp;&nbsp;ncfile= file to use<BR>
20    &nbsp;&nbsp;values=[vnamemap];[vnamefs];[dimvals];[dimxvn];[dimyvn];[dimxyfmt];<BR>
21    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarvals];[sminv],[smaxv];[figt];[kindfig];[mapkind];[mapv];[close]<BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;[vnamemap]: Name of the variable to be used for map<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[vnamefs]: Name in the figure of the variable to be shaded<BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;[dimvals]: ',' list of [dimname]|[value] telling at which dimension of the<BR> 
25    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;variable a given value is required:<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [integer]: which value of the dimension<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -1: all along the dimension<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -9: last value of the dimension<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE, no dim name all the dimension size<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;[dimx/yvn]: name of the variables with the values of the final dimensions (x,y)<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;[dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the values at each axis (or 'auto')<BR>
33    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dxs]: style of x-axis ('auto' for 'pretty')<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nfix', values computed at even 'Ndx'<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Vfix', values computed at even 'Ndx' increments<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR>
37    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dys]: style of y-axis ('auto' for 'pretty')<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;[colorbarvals]=[colbarn]#[fmtcolorbar]#[orientation]#[colorbarticks]<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarn]: name of the color bar for the values to plot<BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colorbarticks]: kind of colorbarticks<BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'direct': direct values<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'time'@[units]|[kind]|[tfmt]|[label] time labels characteristics<BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[units]: units string according to CF conventions ([tunits] since <BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces), <BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'auto' for minutes!since!1949-12-01!00:00:00<BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[kind]: kind of output<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nval': according to a given number of values as 'Nval',[Nval]<BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'exct': according to an exact time unit as 'exct',[tunit]; <BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'l': milisecond<BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[tfmt]: desired format (combination of 'C'-style values and LaTeX)<BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[label]: label at the graph ('!' for spaces, combination of 'C'-style <BR>
62    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values and LaTeX)<BR>
63    &nbsp;&nbsp;&nbsp;&nbsp;[smin/axv]: minimum and maximum value for the shading or:<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Srange': for full range<BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR>
66    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundminmax@val': for min*val,max*val<BR>
67    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR>
68    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;percentile_(100-val)-median)<BR>
69    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR>
70    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR>
71    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR>
72    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;percentile_(100-val)-median)<BR>
73    &nbsp;&nbsp;&nbsp;&nbsp;[figt]: title of the figure ('|' for spaces)<BR>
74    &nbsp;&nbsp;&nbsp;&nbsp;[kindfig]: kind of file for the figure output (ps, eps, png, pdf, ...)<BR>
75    &nbsp;&nbsp;&nbsp;&nbsp;[mapfmt] = [cbarmap]|[mapkind]|[lonlatbox] values for the map <BR>
76    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cbarmap: name of the colorbar for the map<BR>
77    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mapkind: kind of map to use in the plot<BR>
78    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'direct': values are they come<BR>
79    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'shadow',[pos],[enhance]: pseudo-shadding from a given location of the sun<BR>
80    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[pos]: 'N', 'NW'<BR>
81    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[enhance]: enhance factor for the shading ('auto' for 1./5.)<BR>
82    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lonlatbox: [lonSW],[latSW],[lonNE],[latNE] to plot only a lon,lat box<BR>
83    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'full': for the whole domain<BR>
84    &nbsp;&nbsp;&nbsp;&nbsp;[mapv]: map characteristics: [proj],[res]<BR>
85    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;see full documentation: <A HREF="http://matplotlib.org/basemap/" CLASS="la" TARGET="_blank">http://matplotlib.org/basemap/</A><BR>
86    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[proj]: projection<BR>
87    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'cyl', cilindric<BR>
88    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'lcc', lambert conformal<BR>
89    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[res]: resolution:<BR>
90    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'c', crude<BR>
91    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'l', low<BR>
92    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'i', intermediate<BR>
93    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'h', high<BR>
94    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'f', full<BR>
95    &nbsp;&nbsp;&nbsp;&nbsp;[close]: Whether figure should be finished or not<BR>
96    &nbsp;&nbsp;varn= [varsn] name of the variable to plot with shading<BR>
97    </DIV>
98    <DIV CLASS="valins">
99      $ python ${pyHOME}/drawing.py -o draw_2Dshad_map -S 'orog;$conv^{ini}$;lat|-1,lon|-1;lon;lat;<BR>
100    &nbsp;&nbsp;auto;rainbow#auto#auto#time@minutes!since!1949-12-01!00:00:00|exct,6,h|%d$^{%H}$|<BR>
101    &nbsp;&nbsp;date!([DD]$^{[HH]}$);Srange,Srange;convini|Case6|era5_1a;png;binary|shadow,NW,auto|<BR>
102    &nbsp;&nbsp;-70.,-36,-62.,-30.;cyl,c;yes' -v convini -f UBA_ERA5_1a_2D.nc
103    </DIV>
104  </BODY>
105</HTML>
106
Note: See TracBrowser for help on using the repository browser.