How do I properly install cfgrib and eccodes?

1.5k Views Asked by At

I'm trying to run this code on my Mac: https://github.com/EWolffWX/MRMS_Derecho_Composites

When I run it, I get this error ValueError: unrecognized engine cfgrib must be one of: ['netcdf4', 'h5netcdf', 'scipy', 'gini', 'pydap', 'store', 'zarr'] from this line of code:

ds = xr.open_dataset(filepath, engine="cfgrib")

I've tried every solution I could find online, and nothing is working. I've tried both conda install eccodes and conda install -c conda-forge eccodes to install the eccodes library, but neither have worked.

1

There are 1 best solutions below

1
jhamman On

You need to install cfgrib in addition to Xarray:

conda install -c conda-forge cfgrib