| synop_parser | R Documentation |
This function decodes SYNOP FM-12 meteorological messages which are commonly
used for reporting weather observations under the regulations of the World Meteorological Organization (WMO).
It parses one or more SYNOP messages and
returns their structured representation as generated by the SYNOP R6
decoder.
synop_parser(message, country = NULL, simplify = TRUE, as_data_frame = FALSE)
message |
Character vector with SYNOP messages. |
country |
Optional; A single character value passed to the precipitation
indicator decoder to adjust country-specific behaviour (e.g. |
simplify |
Logical. If |
as_data_frame |
Logical. If |
Currently, the decoder contains most of the core logic for parsing the main sections of SYNOP messages that are commonly used in atmospheric sciences. However, it does not yet cover all possible SYNOP groups and fields, and some fields may be missing or incomplete.
When as_data_frame = FALSE (default): a list of decoded SYNOP
messages, or the decoded list directly when simplify = TRUE and a single
message is supplied. When as_data_frame = TRUE: a data.frame with one
row per message and the following columns (all numeric/character as
appropriate, NA when not present in the message):
station_type, station_id, region, obs_day, obs_hour,
wind_unit, wind_estimated, visibility, cloud_cover,
wind_direction, wind_speed, air_temperature, dewpoint_temperature,
station_pressure, sea_level_pressure, pressure_tendency,
pressure_change, precipitation_amount, precipitation_time,
cloud_base_min, cloud_base_max, low_cloud_type,
middle_cloud_type, high_cloud_type, low_cloud_amount,
maximum_temperature (Section 3 daily maximum, °C),
minimum_temperature (Section 3 daily minimum, °C),
gust (highest gust speed from Section 3 group 910ff/911ff, in the wind unit of the message),
cloudiness_height (cloud cover in oktas of the highest cloud layer reported in Section 3,
i.e. cirrus/cirrocumulus/cirrostratus; NA when absent),
sunshine_duration (daily sunshine in hours, from Section 3 group 55SSS),
snow_depth (total snow depth in cm; 0 for trace amounts, NA for non-continuous cover or
unmeasurable depth), snow_depth_state (descriptive state of ground with snow/ice per WMO
code table 0975, e.g. "Even layer of loose dry snow covering ground completely"),
source (the original SYNOP message string).
Row names are sequential integers.
synop_code = "AAXX 01004 88889 12782 61506 10094 20047 30111 40197 53007 60001 81541"
synop_parser(synop_code)
synop_parser(rep(synop_code, 2), simplify = FALSE)
synop_parser(synop_code, as_data_frame = TRUE)
synop_parser(rep(synop_code, 2), as_data_frame = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.