dask.array.to_zarr(arr, url, component=None, storage_options=None, overwrite=False, region=None, compute=True, return_stored=False, **kwargs)[source]

Save array to the zarr storage format

See https://zarr.readthedocs.io for details about the format.

arr: dask.array

Data to store

url: Zarr Array or str or MutableMapping

Location of the data. A URL can include a protocol specifier like s3:// for remote data. Can also be any MutableMapping instance, which should be serializable if used in multiple processes.

component: str or None

If the location is a zarr group rather than an array, this is the subcomponent that should be created/over-written.

storage_options: dict

Any additional parameters for the storage backend (ignored for local paths)

overwrite: bool

If given array already exists, overwrite=False will cause an error, where overwrite=True will replace the existing data.

region: tuple of slices or None

The region of data that should be written if url is a zarr.Array. Not to be used with other types of url.

compute: bool

See store() for more details.

return_stored: bool

See store() for more details.


Passed to the zarr.creation.create() function, e.g., compression options.


If arr has unknown chunk sizes, which is not supported by Zarr. If region is specified and url is not a zarr.Array