@@ -1922,6 +1922,7 @@ def to_zarr(
1922
1922
append_dim : Hashable = None ,
1923
1923
region : Mapping [str , slice ] = None ,
1924
1924
safe_chunks : bool = True ,
1925
+ storage_options : Dict [str , str ] = None ,
1925
1926
) -> "ZarrStore" :
1926
1927
"""Write dataset contents to a zarr group.
1927
1928
@@ -1941,10 +1942,10 @@ def to_zarr(
1941
1942
Parameters
1942
1943
----------
1943
1944
store : MutableMapping, str or Path, optional
1944
- Store or path to directory in file system.
1945
+ Store or path to directory in local or remote file system.
1945
1946
chunk_store : MutableMapping, str or Path, optional
1946
- Store or path to directory in file system only for Zarr array chunks.
1947
- Requires zarr-python v2.4.0 or later.
1947
+ Store or path to directory in local or remote file system only for Zarr
1948
+ array chunks. Requires zarr-python v2.4.0 or later.
1948
1949
mode : {"w", "w-", "a", "r+", None}, optional
1949
1950
Persistence mode: "w" means create (overwrite if exists);
1950
1951
"w-" means create (fail if exists);
@@ -1999,6 +2000,9 @@ def to_zarr(
1999
2000
if Zarr arrays are written in parallel. This option may be useful in combination
2000
2001
with ``compute=False`` to initialize a Zarr from an existing
2001
2002
Dataset with aribtrary chunk structure.
2003
+ storage_options : dict, optional
2004
+ Any additional parameters for the storage backend (ignored for local
2005
+ paths).
2002
2006
2003
2007
References
2004
2008
----------
@@ -2031,6 +2035,7 @@ def to_zarr(
2031
2035
self ,
2032
2036
store = store ,
2033
2037
chunk_store = chunk_store ,
2038
+ storage_options = storage_options ,
2034
2039
mode = mode ,
2035
2040
synchronizer = synchronizer ,
2036
2041
group = group ,
0 commit comments