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

Modify open_xr_dataset to read remote and local Kerchunk files #377

Open
agstephens opened this issue Jul 14, 2023 · 1 comment
Open

Modify open_xr_dataset to read remote and local Kerchunk files #377

agstephens opened this issue Jul 14, 2023 · 1 comment
Assignees

Comments

@agstephens
Copy link
Collaborator

  • roocs-utils version: current
  • Python version: current
  • Operating System: current

Description

We'd like open_xr_dataset(...) to read Kerchunk files as well and existing NetCDF support.

Update:

https://github.com/roocs/roocs-utils/blob/master/roocs_utils/xarray_utils/xarray_utils.py#L69

And write some tests.

Details

Some examples of relevant code:

  1. No authz:
import xarray as xr
import fsspec
import matplotlib.pyplot as plt

file_uri = "https://dap.ceda.ac.uk/neodc/esacci/snow/docs/esacci_snow_swe_v2_5.json"
mapper = fsspec.get_mapper("reference://", fo=file_uri)
ds = xr.open_zarr(mapper)
  1. With authz:

https://github.com/cedadev/kerchunk-tools/blob/main/kerchunk_tools/xarray_wrapper.py#L24-L38

@agstephens agstephens self-assigned this Jul 14, 2023
@agstephens
Copy link
Collaborator Author

@Zeitsperre Zeitsperre transferred this issue from roocs/roocs-utils Dec 12, 2024
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

1 participant