Skip to content

Commit

Permalink
replaced reference mapper with single line
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Oct 12, 2023
1 parent 430e2e8 commit d644701
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kerchunk/xarray_backend.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from xarray.backends import BackendEntrypoint
import xarray as xr
import os
from fsspec.implementations.reference import ReferenceFileSystem
import fsspec


class KerchunkBackend(BackendEntrypoint):
Expand Down Expand Up @@ -47,7 +47,7 @@ def open_reference_dataset(
storage_options = {}
if open_dataset_options is None:
open_dataset_options = {}
fs = ReferenceFileSystem(fo=filename_or_obj, **storage_options)
m = fs.get_mapper()

m = fsspec.get_mapper("reference://", fo=filename_or_obj, **storage_options)

return xr.open_dataset(m, engine="zarr", consolidated=False, **open_dataset_options)

0 comments on commit d644701

Please sign in to comment.