--- id: cfgrib version: "0.9.15.1" license: Apache License Version 2.0 license_treatment: permissive maintenance: active --- # cfgrib — Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes. License: permissive · Maintenance: active · Downloads: 929.2K/mo ## What it is and what it does cfgrib is a Python interface that translates GRIB meteorological data files into datasets following the NetCDF Common Data Model and CF Conventions. It wraps the ECMWF ecCodes library to decode GRIB 1 and 2 files and expose their contents as labeled, multi-dimensional arrays with coordinates and attributes. The package reads data lazily and efficiently, supporting both memory-constrained and larger-than-memory workflows through integration with dask. It also provides low-level access to arbitrary GRIB keys via backend options, coordinate translation to custom data models, and a command-line utility for converting GRIB to NetCDF. Development status is Beta for reading; writing support is Alpha/Broken. The main constraint is that eccodes (a compiled C library) must be installed separately on your system. The package depends on attrs, click, eccodes, and numpy. Use it for: - Decode ERA5 or other GRIB-formatted weather reanalysis data for climate analysis. - Merge multiple GRIB files into a single dataset for batch processing. - Process larger-than-memory meteorological datasets with distributed computation. - Convert GRIB files to NetCDF format via the command-line utility. - Read custom GRIB keys and translate coordinates to domain-specific naming conventions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. cfgrib maps GRIB meteorological data files to the NetCDF Common Data Model following CF Conventions, exposing them as labeled multi-dimensional datasets via an engine interface. Yes. cfgrib is actively maintained, has no known vulnerabilities, and solves a specific problem: reading GRIB meteorological files. Install friction is low (pure Python wheel), and the Apache License Version 2.0 is permissive. The main prerequisite—eccodes binary library—is well-documented and available via conda-forge. Suitable for weather data analysis, climate research, and meteorological data pipelines. ## Install pip install cfgrib uv add cfgrib poetry add cfgrib ## Installing cfgrib Before you install: Low friction: pure Python wheel with four runtime dependencies (attrs, click, eccodes, numpy). Actively maintained with recent commits and no known vulnerabilities. Requires eccodes binary library installed separately; the package provides a selfcheck command to verify system setup. License in practice: Apache License Version 2.0 (permissive): you may use, modify, and distribute cfgrib freely in commercial and private projects, provided you include a copy of the license and do not hold the authors liable. Quickstart: pip install cfgrib import cfgrib ds = cfgrib.open_dataset('file.grib') print(ds) The eccodes binary library must be installed on your system; cfgrib is a Python wrapper around it. Run `python -m cfgrib selfcheck` to verify your setup. Verify before relying: - Whether coordinate system and gridType handling limitations affect your specific GRIB files. - Performance characteristics for larger-than-memory datasets in your deployment environment. - Completeness of GRIB 1 and 2 support for heterogeneous files beyond the documented Beta status. - Compatibility with the engine interface for integration with external data tools. ## Package facts - License: Apache License Version 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 929.2K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags grib file reader python, grib to netcdf conversion, meteorological data format, eccodes python interface, cf conventions grib, weather data python, grib decoder, meteorological-data, grib-format [View on SkillFed](https://skillfed.io/packages/cfgrib) · [View on PyPI](https://pypi.org/project/cfgrib/)