1
import xarray as xr
your_grib_path = "F:\Develop\Codes\Python\OpenStreetMapDataExtraction-master\data.grib2" 
data = xr.open_dataset(your_grib_path, engine="cfgrib")
print(data)

enter image description hereenter image description here

I opened the.grib2 file with the xarray library on windows and python3. I have installed the eccodes library, but when reading the data, an error is still displayed: RuntimeError: Cannot find the ecCodes library.

Can anyone give me some advice?

  • 1
    the python package contains just the bindings to the eccodes library. Either install eccodes yourself, or try installing it with conda which will provide both the library and the bindings – Val Jan 03 '23 at 09:41

0 Answers0