synopR

Overview

The goal of synopR is to provide a simple and robust tool for decoding FM 12 SYNOP (Report of surface observation from a fixed land station) messages, specifically optimized for data retrieved from Ogimet or standard WMO formats. It focuses on extracting Sections 0, 1 and 3 into a tidy, analysis-ready format.

Installation

You can install the development version of synopR from GitHub with:

# install.packages("devtools")
devtools::install_github("ezequiel1593/synopR", build_vignettes = TRUE)

Features

This package extracts the following meteorological parameters:

Section 1

Section 3

Note: Parameters like h, VV,dd,ff, N, Nh, ww, W1, W2, E, E', Cl, Cm, and Ch are extracted in their original coded format from the WMO tables. For N and Nh, the values 0-8 directly represent coverage in oktas. Vectors with some WMO Code Tables are available here.

Usage

Decoding Ogimet Data

The package includes a parser specifically designed for the comma-separated format used by Ogimet:

library(synopR)

# Example Ogimet string
# Downloaded from: https://www.ogimet.com/cgi-bin/getsynop?block=87736&begin=202601011800&end=202601011800
raw_data <- "87736,2026,01,01,18,00,AAXX 01183 87736 11463 41813 10330 20148 39982 40072 5//// 60001 70700 83105 333 56600 83818="

# Parse and decode
decoded <- parse_ogimet(raw_data) |>
  show_synop_data(wmo_identifier = "87736")

print(decoded)

Constraints & Assumptions

To ensure accurate decoding, the package assumes:

Validation

You can check the structural integrity of your SYNOP messages before decoding:

check_synop(c("AAXX 01183 87736 11463 41813 10330 20148 39982 40072 5//// 60001 70700 83105 333 56600 83818=",
              "AAXX 01183 87736 11463 41813 10330 20148 39982 4007 5//// 60001 70700 83105 333 56600 83818="))

Documentation

The complete documentation, including function references and tutorials in both English and Español, is available at:

👉 https://ezequiel1593.github.io/synopR/

Future versions

As far, this package has been tested with an ingest of ~4000 SYNOP messages from Argentina. There are plans to include more groups in the future, like sunshine hours. Also, it would be great to perform massive tests with SYNOP from other regions, to improve performance.