Wreport
C++ library and applications to work with weather reports. The library provides featureful BUFR and CREX encoding and decoding.
Install / Use
/learn @ARPA-SIMC/WreportREADME
WREPORT
Introduction
wreport is a C++ library for working with weather reports.
wreport is a powerful decoder and encoder for the BUFR and CREX formats.
It also provides a useful abstraction to handle values found in weather reports, with awareness of significant digits, measurement units, variable descriptions, unit conversion and attributes on variables.
Features provided:
- Read and write
BUFRversion 2, 3, and 4 - Read and write
CREX - Unit conversion
- Handling of physical variables
C++ and Python API documentation.
Installing wreport
wreport is already packaged in both .rpm and .deb formats, and that provides easy installation for most Linux distributions.
For CentOS and Fedora, rpm files are hosted in a copr repo: https://copr.fedorainfracloud.org/coprs/simc/stable/
For Debian, wreport is available in the testing distribution: https://packages.debian.org/testing/libwreport3
Using docker images with wreport preinstalled is also possible:
docker run -it arpaesimc/fedora:36 /bin/bash
docker run -it arpaesimc/centos:8 /bin/bash
If you want to build and install wreport yourself, you'll need to install Meson and run the following commands:
meson setup builddir && cd builddir
meson compile
meson test
meson install
For more details about Meson see the official documentation https://mesonbuild.com/.
If you want to build the package yourself:
- rpm: the packaging files are in
fedoradirectory of themasterbranch. - deb: the packaging files are in the debian branches (e.g.
debian/sid,ubuntu/jammy, etc.)
Environment variables
These environment variables can be used to control wreport's behaviour at runtime:
WREPORT_TABLES: Table directory to search before the builtin one.WREPORT_EXTRA_TABLES: Extra table directory to search beforeWREPORT_TABLESor the builtin one.WREPORT_MASTER_TABLE_VERSION: force the use of this master table instead of the version configured in BUFR/CREX messages. It accepts positive integers, and the valuenewestrequesting the newest available table.
Importing new tables
WMO BUFR/CREX decoding tables can be downloaded in XML formats at these URLs, looking for "FM 94 BUFR and FM 95 CREX":
- https://community.wmo.int/activity-areas/wis/latest-version
- https://community.wmo.int/activity-areas/wis/previous-versions
Download the whole .zip files, and use wrep-importtable to convert them to
the format wreport uses. For example:
src/wrep-importtable --zipfile=BUFR4-v41.zip
This will generate B*.txt and D*.txt files that can be copied to tables/
or to a directory set in the WREPORT_EXTRA_TABLES environment variable.
AFL instrumentation
To run wreport using American Fuzzy Lop:
CXX=/usr/bin/afl-g++ meson --default-library=static builddir && cd builddir
AFL_HARDEN=1 meson compile
afl-cmin -i testdata/bufr/ -o afl-bufr -- src/afl-test @@
afl-fuzz -t 100 -i afl-bufr -o afl-bufr-out src/afl-test @@
Contact and copyright information
The author of wreport is Enrico Zini enrico@enricozini.com
wreport is Copyright (C) 2005-2024 ARPAE-SIMC urpsim@arpae.it
wreport is licensed under the terms of the GNU General Public License version 2.
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR





