--- id: pygrib version: "2.1.8" license: MIT AND (Apache-2.0 OR BSD-2-Clause) license_treatment: permissive maintenance: active --- # pygrib — Python module for reading/writing GRIB files License: permissive · Maintenance: active · Downloads: 437.3K/mo ## 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 above — verify before relying. Reads and writes GRIB meteorological data files via a Python interface to the ECMWF ECCODES C library, with limited write support for modifying existing files. 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 pip install pygrib uv add pygrib poetry add pygrib ## Installing pygrib 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. 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) 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. 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_current - Install friction: medium - Maintenance: active - Downloads: 437.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags grib file reader python, meteorological data grib, eccodes python wrapper, weather data grib format, grib file parsing, climate data grib files, atmospheric grib reader, meteorology, grib-format, geospatial [View on SkillFed](https://skillfed.io/packages/pygrib) · [View on PyPI](https://pypi.org/project/pygrib/)