pygrib
Python module for reading/writing GRIB files
Decision gist · record as of 2026-08-14
Yes, if you work with meteorological or climate data in GRIB format and have access to the ECCODES library. The package is actively maintained, permissively licensed, and has no known vulnerabilities. Install friction is moderate due to the C dependency, but pre-built wheels and conda packages ease deployment on standard platforms. Not suitable if you need to create GRIB files from scratch or lack system-level ECCODES installation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires the ECCODES C library installed on your system; pip will search common locations ($CONDA_PREFIX, /usr, /usr/local, /opt/local) or use $ECCODES_DIR if set.
- Medium install friction due to a compiled C dependency (ECCODES library).
- The package provides pre-built wheels for Python 3.10–3.14 on macOS and Linux, reducing friction for common platforms.
License · maintenance · safety
MIT AND (Apache-2.0 OR BSD-2-Clause) (permissive) — Dual-licensed under MIT and (Apache-2.0 OR BSD-2-Clause), all permissive. No restrictions on commercial or proprietary use.
last release 2025-10-26 (292 days) · last repo commit 2026-03-13 · 356 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 437,312 downloads/mo, #6,670 on PyPI
Alternatives
Verify before relying
pip install pygrib
import pygrib
grbs = pygrib.open('file.grib')
for grb in grbs:
print(grb)- Whether pre-built wheels include ECCODES or if system installation is always required
- Performance characteristics when reading large GRIB files
- Extent of write capabilities beyond modifying existing files
What it is and what it does
pygrib is a Python wrapper around the ECMWF ECCODES library for reading and writing GRIB meteorological data files. GRIB is the standard format for storing weather and climate model output, satellite observations, and other gridded atmospheric data. The package provides a high-level interface to parse GRIB files and access their contents as Python objects, making it straightforward to integrate meteorological data into scientific workflows.
The package supports reading GRIB files fully and has limited write capabilities—you can modify the contents of an existing GRIB file but cannot create one from scratch. It depends on numpy, pyproj, and packaging, and requires the ECCODES C library to be present on your system. Wheels are available for Python 3.10–3.14 on macOS and Linux, though you will need to ensure ECCODES is installed separately or available via your package manager.
Use it for
- Load weather model output (e.g., from NOAA or ECMWF) for analysis or visualization in scientific Python workflows.
- Extract specific meteorological variables (temperature, pressure, wind) from GRIB files for data processing.
- Modify metadata or values in existing GRIB files for reprocessing or redistribution.
- Integrate gridded climate or weather data into machine learning or statistical analysis pipelines.
- Convert GRIB data to other formats (e.g., NetCDF) by reading and transforming with numpy and pyproj.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with meteorological or climate data in GRIB format and have access to the ECCODES library.
The package is actively maintained, permissively licensed, and has no known vulnerabilities. Install friction is moderate due to the C dependency, but pre-built wheels and conda packages ease deployment on standard platforms. Not suitable if you need to create GRIB files from scratch or lack system-level ECCODES installation.
Install
pygrib on PyPI
Before you install
Medium install friction due to a compiled C dependency (ECCODES library). The package provides pre-built wheels for Python 3.10–3.14 on macOS and Linux, reducing friction for common platforms. Maintenance is active with a recent release (292 days ago) and ongoing repository activity.
Requires the ECCODES C library installed on your system; pip will search common locations ($CONDA_PREFIX, /usr, /usr/local, /opt/local) or use $ECCODES_DIR if set.
License in practice
Dual-licensed under MIT and (Apache-2.0 OR BSD-2-Clause), all permissive. No restrictions on commercial or proprietary use.
Quickstart
pip install pygrib
import pygrib
grbs = pygrib.open('file.grib')
for grb in grbs:
print(grb)
Verify before relying
- Whether pre-built wheels include ECCODES or if system installation is always required
- Performance characteristics when reading large GRIB files
- Extent of write capabilities beyond modifying existing files
Package facts
| License | MIT AND (Apache-2.0 OR BSD-2-Clause) permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagespackagingpyprojnumpy |
| Maintenance | Actively maintained 292 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 437,312 / month, #6,670 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: Science/ResearchProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules |
Evidence: pygrib-2.1.8-cp310-cp310-macosx_15_0_arm64.whl; pygrib-2.1.8-cp310-cp310-macosx_15_0_x86_64.whl; pygrib-2.1.8-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pygrib-2.1.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pygrib-2.1.8-cp311-cp311-macosx_15_0_arm64.whl; pygrib-2.1.8-cp311-cp311-macosx_15_0_x86_64.whl; pygrib-2.1.8-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pygrib-2.1.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pygrib-2.1.8-cp312-cp312-macosx_15_0_arm64.whl; pygrib-2.1.8-cp312-cp312-macosx_15_0_x86_64.whl; pygrib-2.1.8-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pygrib-2.1.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pygrib-2.1.8-cp313-cp313-macosx_15_0_arm64.whl; pygrib-2.1.8-cp313-cp313-macosx_15_0_x86_64.whl; pygrib-2.1.8-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pygrib-2.1.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; pygrib-2.1.8-cp314-cp314-macosx_15_0_arm64.whl; pygrib-2.1.8-cp314-cp314-macosx_15_0_x86_64.whl; pygrib-2.1.8-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; pygrib-2.1.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “grib file reader python”
- pygribReads and writes GRIB meteorological data files via a Python…
- eccodesReads and writes GRIB and BUFR meteorological data files via Python…
- cfgribcfgrib maps GRIB meteorological data files to the NetCDF Common Data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also eccodes · eccodeslib · cfgrib · pdbufr · earthkit-data · herbie-data · earthkit-meteo · ecmwf-api-client · MetPy · cdsapi