Skip to content

Commit

Permalink
added check to ensure consolidated=True is not passed to open_dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Oct 19, 2023
1 parent ff2d639 commit 7c982c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kerchunk/xarray_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def open_reference_dataset(
if open_dataset_options is None:
open_dataset_options = {}

if open_dataset_options.get("consolidated"):
raise ValueError(
"consolidated = True is not supported when opening Kerchunk reference files through Xarray."
)
open_dataset_options["consolidated"] = False

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 7c982c6

Please sign in to comment.