| Title: | Tidy Decoding of SYNOP (Surface Synoptic Observations) Meteorological Messages |
| Version: | 0.2.2 |
| Description: | Decode raw SYNOP (surface synoptic observations) messages into tidy data frames. Supports batch processing of messages from the same station, extracting data from Sections 0, 1, and 3, including temperature, dew point, pressure, wind, clouds, and precipitation. The decoding logic follows the specifications defined in the World Meteorological Organization (2019) "Manual on Codes, Volume I.1 (WMO-No. 306)" https://library.wmo.int/idurl/4/35713. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| Imports: | dplyr, stringr, tidyr, purrr |
| Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0) |
| URL: | https://ezequiel1593.github.io/synopR/ |
| BugReports: | https://github.com/ezequiel1593/synopR/issues |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2026-03-13 13:14:27 UTC; eleze |
| Author: | Ezequiel Elias [aut, cre] |
| Maintainer: | Ezequiel Elias <elezeru15@gmail.com> |
| Depends: | R (≥ 4.1.0) |
| Repository: | CRAN |
| Date/Publication: | 2026-03-18 10:30:07 UTC |
Check SYNOP messages for structural integrity
Description
Validates if SYNOP strings meet basic structural requirements, considering section indicators and 5-digit data groups.
Usage
check_synop(data)
Arguments
data |
A character vector of SYNOP strings or the exact data frame
returned by |
Value
A tibble with validation results for each message.
Examples
msg <- paste0("AAXX 01123 87736 32965 13205 10214 20143 ",
"30022 40113 5//// 80005 333 10236 20128=")
checked_synops <- check_synop(msg)
Parse Ogimet strings into a data frame
Description
Parse Ogimet strings into a data frame
Usage
parse_ogimet(ogimet_data)
Arguments
ogimet_data |
A character vector of Ogimet strings. |
Value
A tibble with Year, Month, Day, Hour, and Raw_synop.
Examples
msg <- paste0("87736,2026,01,01,12,00,AAXX 01123 87736 32965 13205 10214 20143 ",
"30022 40113 5//// 80005 333 10236 20128=")
parsed_data <- parse_ogimet(msg)
Decode multiple SYNOP messages from a single station
Description
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.
Usage
show_synop_data(data, wmo_identifier = NULL, remove_empty_cols = FALSE)
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 |
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")