GITHUB
01 / GRIBX PURE RUST · GRIB1 & GRIB2 · V0.3.0
GribX emblem
GribX

Weather data, decoded & written in pure Rust.

Read GRIB1 and GRIB2 directly into NumPy and xarray, or write datasets back to GRIB2 with gribx.to_grib—with zero C library installs and zero .idx files.

APACHE-2.0 · MACOS · LINUX · WINDOWS

LAUNCH REEL · 1080P60 26.25 S · SOUND ON VIA CONTROLS
Zero C libraries, full WMO GRIB1/GRIB2 codecs (5.53 Bi-Fourier, 5.40 JPEG2000, ≤64-bit packing), radar 3.120 & icosahedral 3.100 grids, and 38.3× faster decoding.
02 / HIGHLIGHTS ZERO C LIBS · ZERO .IDX

Fast by design.

Built to replace C library setup and sidecar index locks with self-contained Rust wheels.

01

Zero C Dependencies

Ships an embedded WMO parameter registry inside a self-contained wheel requiring only numpy and xarray.

02

Zero .idx Sidecars

Scans GRIB1 and GRIB2 headers directly in memory with lock-free multi-threaded decoding.

03

Bit-Exact Parity

Verified max_abs = 0.0 across 5.53 Bi-Fourier, 5.1, 5.40000/5.40010, 5.50000–5.50002, up to 64-bit Simple/Complex, 5.40 JPEG2000, radar 3.120, and icosahedral 3.100.

04

Low Peak Memory

Streams multi-GiB batches directly into preallocated NumPy buffers with minimal memory overhead.

05

Native GRIB1 & GRIB2 Writing

Write GRIB1/GRIB2 via gribx.to_grib (simple ≤32b, complex/SPD, IEEE, 5.40 JPEG2000, PNG, CCSDS, spectral, log, RLE, submessage bundling) and decode specialized PDTs 4.51–4.91 with MARS Section 2 local metadata.

06

GribJump, Remote & Contracts

Rust-side filter_by_keys predicate pushdown (7.5× faster selective open), Dataset.sizes, GribJump slicing, HTTP Range from_chunks, Dask-aligned preferred_chunks, grid_spec()/vertical_coords(), and zero-subprocess gribx CLI.

03 / BENCHMARKS BIT-EXACT · MAX_ABS = 0.0 · 26 THREADS

38× faster. Lower RSS.

Multi-grid GRIB archives (465 MiB to 3.63 GiB) on 26-core Intel Xeon Gold 5320 (Linux x86_64) with zero .idx files.

GRIB benchmarks: gribx vs cfgrib wall-clock time and peak memory
Workload gribx cfgrib cold cfgrib warm Peak RSS Speedup
open_datasets · 3.63 GiB (4,392 msgs) 2.61 s 99.85 s 68.87 s 7.4 vs 8.0 GiB 38.3×
open_datasets · 1.82 GiB (2,196 msgs) 1.47 s 35.89 s 17.42 s 3.8 vs 4.1 GiB 24.4×
open_datasets · 465 MiB (549 msgs) 0.64 s 13.60 s 6.97 s 1.1 vs 1.2 GiB 21.4×
Raw decode · 465 MiB (549 msgs) 0.09 s 2.01 s — max_abs = 0.0 22.3×
04 / CODE READ · MULTI-GRID · WRITE

Read & write in Python.

Drop-in xarray reading, multi-grid hypercube splitting, and native GRIB2 encoding.

05 / FORMATS GRIB1 & GRIB2 · WMO TABLES

Templates & projections.

Pure-Rust codecs for standard WMO grids, spectral harmonics, and compressed data sections.

PACKING TEMPLATES

GRIB1 Read & Write simple, matrix, ieee, 4× second-order, spectral simple/complex; write edition=1
GRIB2 5.0–5.4 Simple (≤64-bit), Matrix (5.1), Complex/SPD (≤64-bit), IEEE
GRIB2 5.40–5.42 JPEG2000 (≤32-bit, read & write), PNG, CCSDS/AEC
GRIB2 5.50–5.200 Spectral (5.50/5.51), Bi-Fourier (5.53 ALADIN/AROME), Log (5.61), RLE (5.200)
GRIB2 Legacy 5.40000/5.40010 JPEG2000, 5.50000–5.50002 spectral/complex
GRIB2 Write & PDTs simple, complex/SPD, ieee, jpeg (5.40), png, ccsds, spectral, log, rle, bundling; PDTs 4.0–4.91 & MARS Sec 2

GRID PROJECTIONS

Lat/Lon & Gaussian regular_ll, reduced_ll, regular_gg, reduced_gg (pl), irregular (3.130)
Rotated & Stretched Rotated & Schmidt-stretched LL/GG (3.1–3.5, 3.41–3.43)
Conic & Azimuthal Lambert (3.30/3.33), Albers (3.31), LAEA (3.140), Equatorial Azimuthal (3.110)
Cylindrical & Satellite Mercator (3.10/3.13), Transverse Mercator (3.12), Polar Stereo (3.20/3.23), Space View (3.90)
Radar & Unstructured Radar Azimuth-Range (3.120), Icosahedral (3.100), ICON (3.101), HEALPix (3.150)
LAM, Cross-Sec & GRIB1 Bi-Fourier LAM (3.61–3.63), Cross-Section/Hovmöller (3.1000–3.1200), SH (3.50/3.53), GRIB1 13/80/192/193
06 / GET GRIBX PYPI · DOCS · APACHE-2.0

Install in seconds.

Prebuilt wheels for macOS, Linux, and Windows. Only numpy and xarray required.

PYTHON PACKAGE

pip install gribx

Self-contained Rust wheel (~2 MiB) with embedded WMO & MARS tables — zero C libraries or external binaries required.

RESOURCES

Explore API references, guides, and release wheels on Read the Docs and GitHub.