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))
Data frame with (around) one day of data.
Code of the station.
Name of the station.
Column order of the expected variables (see details).
Time zone of the supplied time vector ('utc'
by default).
Label for hours ('Hours'
by default).
Date format for the title of the meteogram (the default is
'%Y-%m-%d'
, the ISO 8601 date format).
Variable labels.
Colors for every variable.
Lower graphic limits (if fixed).
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.
data(climatol_data)
meteogram(AWS_1day, 'S123', 'My airport')
Run the code above in your browser using DataLab