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

grib2io v2.0.0b1 - xarray backend on Hera? #64

Closed
lgramer opened this issue Mar 29, 2023 · 1 comment
Closed

grib2io v2.0.0b1 - xarray backend on Hera? #64

lgramer opened this issue Mar 29, 2023 · 1 comment

Comments

@lgramer
Copy link

lgramer commented Mar 29, 2023

We are interested in testing with the xarray backend for grib2io v2. We followed the suggested directions for testing on Hera as below. We did not expect the open_dataset call to succeed (these GRB2 output files include pressure coordinates, height coordinates, and "other" - reading them with xarray and the cfgrib engine, for example, is quite complicated). But it seems that xarray does not "see" the grib2io backend yet either. Please see below:

# module use /scratch1/NCEPDEV/mdl/apps/modulefiles
# module load python/3.10
# module list

Currently Loaded Modules:
  1) intel/2022.1.2   2) hpss/hpss   3) rocoto/1.3.1   4) ncview/2.1.7   5) sutils/default   6) python/3.10

# python3
Python 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import grib2io
>>> import xarray as xr
>>> 
>>> print(grib2io.__version__)
2.0.0b1
>>>
>>> ds = xr.open_dataset('/scratch2/AOML/aoml-hafs1/Lew.Gramer/ocean/hafsv1_fnl.hycom_hfsb_RiC_0p20/coupled/grb2/2022092518/09l.2022092022092518.hfsb.storm.atm.f126.grb2',engine='grib2io')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/scratch1/NCEPDEV/mdl/apps/python/3.10/lib/python3.10/site-packages/xarray/backends/api.py", line 526, in open_dataset
    backend = plugins.get_backend(engine)
  File "/scratch1/NCEPDEV/mdl/apps/python/3.10/lib/python3.10/site-packages/xarray/backends/plugins.py", line 185, in get_backend
    raise ValueError(
ValueError: unrecognized engine grib2io must be one of: ['netcdf4', 'scipy', 'gini', 'store']

@EricEngle-NOAA
Copy link
Collaborator

@lgramer - Thanks for letting us know about this. We did fix this issue in the repo with e0b9ace and will be fixed in Beta 2.

Specifically related to Hera, I just applied a patch to MDL's Python 3.8 and 3.10 which fixes the issue for Beta 1 installations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants