From 5e66ad0a34726a55cfa4d1c1d51876766900a358 Mon Sep 17 00:00:00 2001 From: Timothy Hodson <34148978+thodson-usgs@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:01:35 -0500 Subject: [PATCH 1/2] Update index.md (#275) Remove `fsspec` from `xr.open_dataset` usage example. --- docs/index.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0e79418f..8dfa80df 100644 --- a/docs/index.md +++ b/docs/index.md @@ -59,14 +59,9 @@ virtual_ds.virtualize.to_kerchunk('combined.json', format='json') Now you can open your shiny new Zarr store instantly: ```python -fs = fsspec.filesystem('reference', fo='combined.json') -m = fs.get_mapper('') - -ds = xr.open_dataset(m, engine='kerchunk', chunks={}) # normal xarray.Dataset object, wrapping dask/numpy arrays etc. +ds = xr.open_dataset('combined.json', engine='kerchunk', chunks={}) # normal xarray.Dataset object, wrapping dask/numpy arrays etc. ``` -(Since we serialized the cached results using the kerchunk specification then opening this zarr store still requires using fsspec via the kerchunk xarray backend.) - No data has been loaded or copied in this process, we have merely created an on-disk lookup table that points xarray into the specific parts of the original netCDF files when it needs to read each chunk. See the [Usage docs page](#usage) for more details. From ba46a7733d9ffb13b40ac6ab2b6e055ca3a695d9 Mon Sep 17 00:00:00 2001 From: Tom Nicholas Date: Mon, 4 Nov 2024 10:10:47 -0700 Subject: [PATCH 2/2] remove unused ManifestBackendArray class (#282) --- virtualizarr/readers/common.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/virtualizarr/readers/common.py b/virtualizarr/readers/common.py index 9be2b45f..f6f5dff4 100644 --- a/virtualizarr/readers/common.py +++ b/virtualizarr/readers/common.py @@ -19,10 +19,9 @@ Variable, open_dataset, ) -from xarray.backends import AbstractDataStore, BackendArray +from xarray.backends import AbstractDataStore from xarray.core.indexes import PandasIndex -from virtualizarr.manifests import ManifestArray from virtualizarr.utils import _FsspecFSFromFilepath XArrayOpenT = str | os.PathLike[Any] | BufferedIOBase | AbstractDataStore @@ -34,12 +33,6 @@ DataTree = Any -class ManifestBackendArray(ManifestArray, BackendArray): - """Using this prevents xarray from wrapping the KerchunkArray in ExplicitIndexingAdapter etc.""" - - ... - - def open_loadable_vars_and_indexes( filepath: str, loadable_variables,