meteogram | R Documentation |
This function plots a meteogram from hourly or sub-hourly data of eight meteorological variables available in a data frame spanning one day.
meteogram(df, code='', name='', cols=1:9, tz='utc', hlab='Hours',
datefm='%Y-%m-%d', vlab=c('Wind direction (deg)','Wind speed (m/s)',NA,NA,
'Temperature (C)','Rel. humidity (%)','Precip. (mm)','Pressure (hPa)'),
vcol=c(hsv(.1,1,.9),hsv(.1,1,.9),2,2,2,hsv(.4,1,.7),4,'brown'),
llim=c(0,0,NA,NA,0,0,0,NA), ulim=c(360,20,NA,NA,20,100,4,NA))
df |
Data frame with (around) one day of data. |
code |
Code of the station. |
name |
Name of the station. |
cols |
Column order of the expected variables (see details). |
tz |
Time zone of the supplied time vector ( |
hlab |
Label for hours ( |
datefm |
Date format for the title of the meteogram (the default is
|
vlab |
Variable labels. |
vcol |
Colors for every variable. |
llim |
Lower graphic limits (if fixed). |
ulim |
Upper graphic limits (if fixed). |
This function expects a data frame containing observation time and eight meteorological variables in this column order:
Time of the observation (as POSIXct)
10 minutes average wind direction in degrees
10 minutes average wind speed in m/s
3 sec. maximum gust direction in degrees
3 sec. maximum gust speed in m/s
Air temperature in degrees Celsius
Relative humidity in %
Precipitation in mm
Barometric pressure in hPa
However, if the data frame has these variables in a different order, it can
be specified with the parameter cols
.
See strftime
for ways to specify date formats.
strftime
data(climatol_data)
meteogram(AWS_1day, 'S123', 'My airport')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.