@@ -14,7 +14,7 @@ def save_dataset(
14
14
store : Union [PathType , MutableMapping [str , bytes ]],
15
15
storage_options : Optional [Dict [str , str ]] = None ,
16
16
auto_rechunk : Optional [bool ] = None ,
17
- ** kwargs : Any
17
+ ** kwargs : Any ,
18
18
) -> None :
19
19
"""Save a dataset to Zarr storage.
20
20
@@ -87,6 +87,7 @@ def save_dataset(
87
87
def load_dataset (
88
88
store : Union [PathType , MutableMapping [str , bytes ]],
89
89
storage_options : Optional [Dict [str , str ]] = None ,
90
+ ** kwargs : Any ,
90
91
) -> Dataset :
91
92
"""Load a dataset from Zarr storage.
92
93
@@ -99,6 +100,8 @@ def load_dataset(
99
100
Zarr store or path to directory in file system to load from.
100
101
storage_options:
101
102
Any additional parameters for the storage backend (see ``fsspec.open``).
103
+ kwargs
104
+ Additional arguments to pass to :func:`xarray.open_zarr`.
102
105
103
106
Returns
104
107
-------
@@ -110,7 +113,7 @@ def load_dataset(
110
113
store = fsspec .get_mapper (store , ** storage_options )
111
114
elif isinstance (store , Path ):
112
115
store = str (store )
113
- ds : Dataset = xr .open_zarr (store , concat_characters = False ) # type: ignore[no-untyped-call]
116
+ ds : Dataset = xr .open_zarr (store , concat_characters = False , ** kwargs ) # type: ignore[no-untyped-call]
114
117
for v in ds :
115
118
# Workaround for https://github.com/pydata/xarray/issues/4386
116
119
if v .endswith ("_mask" ): # type: ignore
0 commit comments