Registry / devops / herbie-data

herbie-data

JSON →
library2026.3.0pypypi✓ verified 83d ago

Herbie is a Python library for downloading and reading numerical weather prediction (NWP) model data in GRIB2 format. It provides a unified interface to access high-resolution weather data from sources like HRRR, RAP, GFS, and others. The current version is 2026.3.0, with a regular release cadence (monthly).

pip install herbie-data
INSTALL
IMPORT
SIG · HERBIE-DATA
H
herbie-data
devopspythonv2026.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Herbie
from herbie import Herbie
from herbie_data import Herbie
Old package name was 'herbie-data' but the import is 'herbie'
fastHerbie
from herbie import fastHerbie

This example downloads the 2-meter temperature field from the HRRR model for January 1, 2022.

from herbie import Herbie # Download HRRR temperature data for a specific time H = Herbie('2022-01-01', model='hrrr', product='sfc', fxx=0) H.download() ds = H.xarray('TMP:2 m') print(ds['t2m'])
Debug
Known issues
gotchaThe default data directory is $HOME/data. If you don't set HERBIE_DATA_DIR, downloads go to your home directory. Use os.environ['HERBIE_DATA_DIR'] = '/path/to/data' to change it.
fix
Set the environment variable HERBIE_DATA_DIR before creating a Herbie object.
affects: all
breakingVersion 2024.x changed the internal API for accessing GRIB2 fields. The old method Herbie['TMP:2 m'] no longer works; use Herbie.xarray('TMP:2 m') instead.
fix
Use the .xarray() method with the field name as a string.
affects: >=2024.0.0
gotchaSome models (e.g., GFS) require specifying the 'product' argument. If omitted, Herbie may fail with a vague error. Always consult the model's documentation for valid product names.
fix
Pass the correct product string, e.g., product='pgrb2b.0p25' for GFS 0.25 deg.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'herbie'
The package is installed as 'herbie-data' but imported as 'herbie'.
fix
pip install herbie-data and then use 'from herbie import Herbie'.
KeyError: 'TMP:2 m'
The GRIB2 field name might be different or the product does not contain that variable.
fix
List available fields with H.inventory() and check the exact parameter name.
ValueError: unknown model 'gfs'
Model names are case-sensitive. 'gfs' should be 'GFS'.
fix
Use the exact model name: model='GFS'.
Upgrade
Version history
2026.3.0latest on PyPI · released Mar 7, 2026
Audit
Dependencies
cfgribrequiredRequired for reading GRIB2 files
eccodesoptionalECMWF ecCodes library for GRIB2 decoding
requestsrequiredHTTP requests to download data
Agent activity
16 hits · last 30 days
node
16
Resources
herbie-data — pip install herbie-data · libregistry