@@ -4242,6 +4242,9 @@ def to_zarr(
4242
4242
safe_chunks : bool = True ,
4243
4243
storage_options : dict [str , str ] | None = None ,
4244
4244
zarr_version : int | None = None ,
4245
+ zarr_format : int | None = None ,
4246
+ write_empty_chunks : bool | None = None ,
4247
+ chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
4245
4248
) -> ZarrStore : ...
4246
4249
4247
4250
# compute=False returns dask.Delayed
@@ -4262,6 +4265,9 @@ def to_zarr(
4262
4265
safe_chunks : bool = True ,
4263
4266
storage_options : dict [str , str ] | None = None ,
4264
4267
zarr_version : int | None = None ,
4268
+ zarr_format : int | None = None ,
4269
+ write_empty_chunks : bool | None = None ,
4270
+ chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
4265
4271
) -> Delayed : ...
4266
4272
4267
4273
def to_zarr (
@@ -4280,6 +4286,9 @@ def to_zarr(
4280
4286
safe_chunks : bool = True ,
4281
4287
storage_options : dict [str , str ] | None = None ,
4282
4288
zarr_version : int | None = None ,
4289
+ zarr_format : int | None = None ,
4290
+ write_empty_chunks : bool | None = None ,
4291
+ chunkmanager_store_kwargs : dict [str , Any ] | None = None ,
4283
4292
) -> ZarrStore | Delayed :
4284
4293
"""Write DataArray contents to a Zarr store
4285
4294
@@ -4380,9 +4389,30 @@ def to_zarr(
4380
4389
Any additional parameters for the storage backend (ignored for local
4381
4390
paths).
4382
4391
zarr_version : int or None, optional
4383
- The desired zarr spec version to target (currently 2 or 3). The
4384
- default of None will attempt to determine the zarr version from
4385
- ``store`` when possible, otherwise defaulting to 2.
4392
+
4393
+ .. deprecated:: 2024.9.1
4394
+ Use ``zarr_format`` instead.
4395
+
4396
+ zarr_format : int or None, optional
4397
+ The desired zarr format to target (currently 2 or 3). The default
4398
+ of None will attempt to determine the zarr version from ``store`` when
4399
+ possible, otherwise defaulting to the default version used by
4400
+ the zarr-python library installed.
4401
+ write_empty_chunks : bool or None, optional
4402
+ If True, all chunks will be stored regardless of their
4403
+ contents. If False, each chunk is compared to the array's fill value
4404
+ prior to storing. If a chunk is uniformly equal to the fill value, then
4405
+ that chunk is not be stored, and the store entry for that chunk's key
4406
+ is deleted. This setting enables sparser storage, as only chunks with
4407
+ non-fill-value data are stored, at the expense of overhead associated
4408
+ with checking the data of each chunk. If None (default) fall back to
4409
+ specification(s) in ``encoding`` or Zarr defaults. A ``ValueError``
4410
+ will be raised if the value of this (if not None) differs with
4411
+ ``encoding``.
4412
+ chunkmanager_store_kwargs : dict, optional
4413
+ Additional keyword arguments passed on to the `ChunkManager.store` method used to store
4414
+ chunked arrays. For example for a dask array additional kwargs will be passed eventually to
4415
+ :py:func:`dask.array.store()`. Experimental API that should not be relied upon.
4386
4416
4387
4417
Returns
4388
4418
-------
@@ -4448,6 +4478,9 @@ def to_zarr(
4448
4478
safe_chunks = safe_chunks ,
4449
4479
storage_options = storage_options ,
4450
4480
zarr_version = zarr_version ,
4481
+ zarr_format = zarr_format ,
4482
+ write_empty_chunks = write_empty_chunks ,
4483
+ chunkmanager_store_kwargs = chunkmanager_store_kwargs ,
4451
4484
)
4452
4485
4453
4486
def to_dict (
0 commit comments