windrose | R Documentation |
This function plots a wind-rose from a data frame with columns DateTime, Wind direction and Wind speed.
windrose(dat, cols=1:3, code='', name='', uni='m/s', ndir=16, spdcut=NULL,
maxnsc=8, fnum=4, fint=5, flab=2, ang=-3*pi/16, margin=c(0,0,4,0),
pal=c('cyan','yellow','orange','red','brown'), ...)
dat |
Data frame with columns DateTime, Wind direction and Wind speed. |
cols |
Columns containing DateTime, Wind direction and Wind speed [1:3]. |
code |
Station code. |
name |
Station name. |
uni |
Speed units for the legend header ['m/s']. |
ndir |
Number of classes of wind direction [16]. |
spdcut |
Speed values to set the wind speed classes. If not provided, classes will be automatically calculated. |
maxnsc |
Maximum number of wind speed classes [8]. |
fnum |
Number of reference circles to plot [4]. |
fint |
Frequency interval (in %) between reference circles [5]. |
flab |
Parameter indicating which circles must be labelled:
|
ang |
Angle along which circles will be labeled, in radians [ |
margin |
Margins vector for the plot (to be passed to |
pal |
Color gradation to fill the frequency polygons. |
... |
Other graphic parameters. |
After reading the data, a frequency table is calculated in 16 wind directions and a variable number of wind speed classes, which can be set by the user. Calm observations (wind speed equal to zero) are distributed proportionally into the first wind speed class. The wind direction data must be provided in degrees.
This table, which covers all available pairs of wind direction and speed present in the data frame, is the basis of the wind-rose plot.
The table of wind frequencies by direction and speed classes is returned invisibly.
data(climatol_data) #load example data
windtable <- windrose(AWS_1year, 1:3, 'st123', 'My airport') #plot windrose
print(windtable) #display the table of calculated wind frequencies
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.