grib_tables
Retrieve details of each GRIB parameter from the parameter abbreviation (e.g. "TMP") or from the numeric identifier.
grib_tables loads the GDAL CSV files into memory and allows the user to:
- Map from parameter abbreviation strings to the numerical representation of that parameter, and the full parameter name and unit.
- Map from the numerical representation of each parameter to the parameter name, abbreviation, and unit.
Example
use ;
#
Why does grib_tables exist?
To build hypergrib, we need to be able to decode GRIB .idx files.
We're aware of two awesome existing GRIB readers implemented in Rust (gribberish and grib-rs) but, at the time of writing, neither can decode .idx files.
Hence grib_tables exists to enable hypergrib to decode GRIB .idx files.
Related
- GRIB tables represented as
.csvfiles in GDAL. See the README for that directory. - Gribberish discussion.
- Post to the gdal-dev mailing list about splitting the CSVs and/or copying the CSVs.)
- A previous design sketch where we try to faithfully capture the GRIB tables hierarchy (Discipline > Category > Parameter). But this feels overkill. It might be slightly faster because we can create a perfect hash at compile time. But we only need to look things up in the GRIB table whilst indexing a new GRIB dataset. When "normal users" use the dataset, they can just read the metadata that we create for the dataset.