This function decodes a vector or data frame column of raw SYNOP strings belonging to the same WMO station. It efficiently processes multiple observations at once, returning a tidy data frame.
Arguments
- data
A character vector, or a data frame or tibble with one column containing raw SYNOP strings.
- wmo_identifier
A 5-digit character string or integer representing the station WMO ID. If NULL (default), all messages are decoded.
- remove_empty_cols
Logical. Should columns containing only
NAvalues be removed?
Value
A tidy tibble where each row represents one observation time and each column a decoded meteorological variable.
wmo_id - WMO station identifier
Year - (from parse_ogimet())
Day - As informed by Section 0
Hour - As informed by Section 0
Cloud_base_height - Lowest cloud base height, not decoded
Visibility - Not decoded
Total_cloud_cover - In oktas, 9 means 'invisible' sky by fog or other phenomenon
Wind_direction - In tens of degree, 99 means 'variable wind direction'
Wind_speed
Wind_speed_unit - Either 'm/s' or 'knots'
Air_temperature - In degrees Celsius
Dew_point - In degrees Celsius
Relative_humidity - As a percentage
Station_pressure - In hPa
MSLP_GH - Mean sea level pressure (in hPa) or geopotential height (in gpm)
Present_weather - Not decoded
Past_weather1 - Not decoded
Past_weather2 - Not decoded
Precipitation_S1 - In mm
Precip_period_S1 - In hours ('Precipitation_S1' fell in the last 'Precip_period_S1' hours)
Cloud_amount_Nh - Cloud coverage from low or medium cloud, same as 'Total_cloud_cover'
Low_clouds_CL - Not decoded
Medium_clouds_CM - Not decoded
High_clouds_CH - Not decoded
Max_temperature - In degrees Celsius
Min_temperature - In degrees Celsius
Ground_state - Not decoded
Ground_temperature - Integer, in degrees Celsius
Snow_ground_state - Not decoded
Snow_depth - In cm, is assumed to be between 1 and 996 cm
Precipitation_S3 - In mm
Precip_period_S3 - In hours ('Precipitation_S3' fell in the last 'Precip_period_S3' hours)
Examples
msg <- paste0("AAXX 01123 87736 32965 13205 10214 20143 ",
"30022 40113 5//// 80005 333 10236 20128 56000 81270=")
synop_df <- data.frame(messages = msg)
decoded_data <- show_synop_data(synop_df, "87736")
