Provides a high-level interface to the ECWMF ECCODES C library for reading GRIB files. There are limited capabilities for writing GRIB files (you can modify the contents of an existing file, but you can't create one from scratch). See the online docs for example usage.
The easiest way to get everything installed is to use the conda:
conda install -c conda-forge pygrib
If you don't use conda, be sure you have the ECCODES library installed first. Then you can install pygrib with pip:
ECCODES_DIR=path/to/eccodes pip install pygrib
$ECCODES_DIR is the path to the directory containing
ECCODES_DIR is not specified, a few common locations
$CONDA_PREFIX,/usr,/usr/local,/opt/local will be searched.
Alternately, clone the github repo and run
python setup.py install (after setting
python test.py from the source directory to test your pygrib installation.
For full installation instructions and API documentation, see https://jswhit.github.io/pygrib.
Sample iPython notebooks illustrating pygrib usage: