source: lmdz_wrf/trunk/tools/documentation/plotting/WindRose.html @ 2734

Last change on this file since 2734 was 1443, checked in by lfita, 8 years ago

Adding `WindRose?' html page

File size: 7.1 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      Wind Rose
11    </DIV>
12    <DIV CLASS="valimg">
13      Plotting a Wind Rose (from where the dinw blows)
14      <TABLE>
15        <TR><TD><IMG WIDTH="50%" SRC="figs/WindRose_anglespeedfreq.png"></IMG></TD></TR>
16        <TR><TD><IMG WIDTH="50%" SRC="figs/WindRose_linepoint-multicoltime.png"></IMG></TD></TR>
17      </TABLE>
18    </DIV>
19    <DIV CLASS="valhelp">
20    draw_WindRose(ncfile, values, varnames)<BR>
21    &nbsp;&nbsp;ncfile= netCDF file with the winds and extra variable (if required)<BR>
22    &nbsp;&nbsp;values=[dimvariables][kindRose]:[imgtit]:[imgkind]:[kindlabelsangle]:[freqfileout]:[fname]:[close]<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[dimvariables]: ';' list of [dimn]|[dvalue] dimension and slice along dimension to retrieve the winds<BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dimn]: name of the dimension<BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dvalue]: value for the slice in the given dimension<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [integer]: which value of the dimension<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -1: all along the dimension<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* -9: last value of the dimension<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* [beg],[end],[freq] slice from [beg] to [end] every [freq]<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* NOTE, no dim name all the dimension size<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No value takes all the range of the dimension<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;[kindRose]: [kind];[value1];[...[valueN]] Kind of rose to plot and values of the kind<BR>
33    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'fill': filling the area since the center of the rose<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'anglespeedfreq': grid of frequencies of each angle and speed following a given discretization<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: ;[Nang];[Nspeed];[maxspeed];[cbar];[maxfreq]<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'linepoint': consecutive (time, height, level, ...) line-point angle and speed values. Three different species<BR>
37    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'multicol': line-marker color changing according to a third variable [extravarn]<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [extravarn];[line];[marker];[colbar];[Nang]<BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'multicoltime': line-marker color changing according to a temporal variable [extravarn]<BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [extravarn];[line];[marker];[colbar];[Nang];[timekind];[timefmt];[timelabel]<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'singlecol': same color for the line-marker<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [line];[marker];[col];[Nang]<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'scatter': a marker for each wind at different values (time, height, level, ...). Three different species<BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'multicol':marker color changing according to a third variable [extravarn]<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [extravarn];[marker];[colbar];[Nang]<BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'multicoltime': marker color changing according to a temporal variable [extravarn]<BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [extravarn];[line];[marker];[colbar];[Nang];[timekind];[timefmt];[timelabel]<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'singlecol': same color for all the markers<BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values: [marker];[col];[Nang]<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;meaning (where apply):<BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[extravarn]: name of the extra variable <BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[line]: type of the line to draw<BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[marker]: type of marker to use <BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[colbar]: name of the colorbar ('auto' for 'spectral_r')<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Nang]: number of angles to divide the rose ('auto' for 8)<BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Nspeed]: number of speeds to divide the wind speed distribution ('auto' for 8)<BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[maxspeed]: maximum wind speed used to compute the frequency of distributions ('auto' for 40.)<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[timekind]; time computation of ticks<BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'Nval': according to a given number of values as 'Nval',[Nval]<BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'exct': according to an exact time unit as 'exct',[tunit]; <BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR>
62    &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>
63    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'l': milisecond<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[timefmt]; desired format of time labels (C-like)<BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[timelabel]; label of time colorbar at the graph ('!' for spaces)<BR>
66    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imgtit: title of the image ('!' for spaces)<BR>
67    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imgkind: kind of output of the image<BR>
68    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kindlabelsangle: kind of labels for the angles of the wind Rose<BR>
69    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'cardianals': Following combinations of 'N', 'E', 'S', 'W' according to Nang<BR>
70    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freqfileout: whether the file with the frequencies of wind angle and speeds should be created (only working<BR>
71    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for 'anglespeedfreq')<BR>
72    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fname: name of the figure<BR>
73    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;close: whether figure should be closed or not<BR>
74    &nbsp;&nbsp;varnames= [windun],[windvn] variables' name <BR>
75    </DIV>
76    <DIV CLASS="valins">
77      $ python ${pyHOME}/drawing.py -o draw_WindRose -S 'lon|7;lat|2:anglespeedfreq;16;8;40.;auto;auto:November!ERA-I!daily!mean!wind!at!850!hPa:png:cardinals:False:WindRose:True' -v u,v -f reg1_daymean_mon11_lev850_kmh.nc <BR>
78      $ python ${pyHOME}/drawing.py -o draw_WindRose -S 'lon|7;lat|2:linepoint;multicoltime;time;auto;auto;auto;auto;exct,5,d;%m/%d;date!([DD]/[MM]):November!ERA-I!daily!mean!wind!at!850!hPa:png:cardinals:False:WindRose:True' -v u,v -f reg1_daymean_mon11_lev850_kmh.nc
79
80    </DIV>
81  </BODY>
82</HTML>
83
Note: See TracBrowser for help on using the repository browser.