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

Pass file_type to OpenWithXarray #6

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Pass file_type to OpenWithXarray #6

merged 1 commit into from
Aug 31, 2023

Conversation

cisaacstern
Copy link
Member

The latest deployment following merge of #5 failed with

File "/srv/conda/envs/notebook/lib/python3.9/site-packages/pangeo_forge_recipes/openers.py", 
  line 239, in open_with_xarray ds = xr.open_dataset(url_or_file_obj, **kw)
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/xarray/backends/api.py", 
  line 523, in open_dataset engine = plugins.guess_engine(filename_or_obj)
File "/srv/conda/envs/notebook/lib/python3.9/site-packages/xarray/backends/plugins.py", 
  line 164, in guess_engine raise ValueError(error_msg)
ValueError: did not find a match in any of xarray's currently installed IO backends ['netcdf4', 'h5netcdf', 'scipy', 'cfgrib', 'pydap', 'rasterio', 'zarr'].

which is surprising to me, because this works for me locally:

import gcsfs
import xarray as xr

gcs = gcsfs.GCSFileSystem()

example_cached_file = 'pangeo-forge-prod-cache/000754b9c465f3517086d451191fe387-https_oceandata.sci.gsfc.nasa.gov_ob_getfile_aqua_modis.20120508_20120515.l3m.8d.chl.chlor_a.4km.nc'
with gcs.open(example_cached_file) as f:
    ds = xr.open_dataset(f)

anyway, this PR is the most obvious possible fix for that error, so I'll try this.

@cisaacstern cisaacstern merged commit 8cb545d into main Aug 31, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant