@@ -4344,14 +4344,22 @@ def to_zarr(
43444344 Store or path to directory in local or remote file system only for Zarr
43454345 array chunks. Requires zarr-python v2.4.0 or later.
43464346 mode : {"w", "w-", "a", "a-", r+", None}, optional
4347- Persistence mode: "w" means create (overwrite if exists);
4348- "w-" means create (fail if exists);
4349- "a" means override all existing variables including dimension coordinates (create if does not exist);
4350- "a-" means only append those variables that have ``append_dim``.
4351- "r+" means modify existing array *values* only (raise an error if
4352- any metadata or shapes would change).
4347+ Persistence mode:
4348+
4349+ - "w" means create (remove old if exists and write new);
4350+ - "w-" means create (fail if exists);
4351+ - "a" means override all existing variables including dimension coordinates (create if does not exist);
4352+ - "a-" means only append those variables that have ``append_dim``.
4353+ - "r+" means modify existing array *values* only (raise an error if
4354+ any metadata or shapes would change).
4355+
43534356 The default mode is "a" if ``append_dim`` is set. Otherwise, it is
43544357 "r+" if ``region`` is set and ``w-`` otherwise.
4358+
4359+ .. note::
4360+ When modifying an existing Zarr array that is lazily opened, the "w"
4361+ behavior can be surprising since the underlying file that is being
4362+ lazily read from might get deleted before the data is computed.
43554363 synchronizer : object, optional
43564364 Zarr array synchronizer.
43574365 group : str, optional
0 commit comments