Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to read GRIB data #8430

Closed
2 of 5 tasks
paumillet opened this issue Nov 8, 2023 · 2 comments
Closed
2 of 5 tasks

Trying to read GRIB data #8430

paumillet opened this issue Nov 8, 2023 · 2 comments
Labels
bug needs triage Issue that has not been reviewed by xarray team member

Comments

@paumillet
Copy link

What happened?

I want to read data stored in a GRIB file with xarray. To do so, I tried the following line, as suggested here:

ds = xr.load_dataset(myinfile, engine="cfgrib")

But the following error was returned

ValueError: unrecognized engine cfgrib must be one of: ['netcdf4', 'h5netcdf', 'scipy', 'store', 'zarr']

Nevertheless, cfgrib seems to be well installed, I do not meet any error when I try to import this library alone.

How can I set cfgrib to be a recognized engine?

Thanks in advance for your help

What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

MVCE confirmation

  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.
  • Recent environment — the issue occurs with the latest version of xarray and its dependencies.

Relevant log output

No response

Anything else we need to know?

No response

Environment

xr.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.9.16 (main, Jan 11 2023, 16:05:54)
[GCC 11.2.0]
python-bits: 64
OS: Linux
OS-release: 5.15.0-87-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.14.0
libnetcdf: 4.9.2

xarray: 2023.5.0
pandas: 2.0.2
numpy: 1.24.3
scipy: 1.10.1
netCDF4: 1.6.3
pydap: None
h5netcdf: 1.2.0
h5py: 3.9.0
Nio: None
zarr: 2.16.0
cftime: 1.6.2
nc_time_axis: None
PseudoNetCDF: None
iris: None
bottleneck: 1.3.7
dask: 2023.4.1
distributed: 2023.4.1
matplotlib: 3.7.1
cartopy: 0.21.1
seaborn: None
numbagg: None
fsspec: 2023.6.0
cupy: None
pint: 0.22
sparse: 0.14.0
flox: None
numpy_groupies: None
setuptools: 67.7.2
pip: 23.1.2
conda: None
pytest: None
mypy: None
IPython: 8.13.2
sphinx: None

@paumillet paumillet added bug needs triage Issue that has not been reviewed by xarray team member labels Nov 8, 2023
Copy link

welcome bot commented Nov 8, 2023

Thanks for opening your first issue here at xarray! Be sure to follow the issue template!
If you have an idea for a solution, we would really welcome a Pull Request with proposed changes.
See the Contributing Guide for more.
It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better.
Thank you!

@paumillet
Copy link
Author

My bad, I didn't realize that I wasn't running last xarray version. 🙈
I've just updated it and it's now running properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage Issue that has not been reviewed by xarray team member
Projects
None yet
Development

No branches or pull requests

1 participant