From 1e54410acfc2bffc340531a7ef789f6baf48d023 Mon Sep 17 00:00:00 2001 From: martinspetlik Date: Wed, 14 Feb 2024 15:11:45 +0100 Subject: [PATCH 1/2] zarr file missing values alert --- doc/user-guide/io.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst index 48751c5f299..30f54d3f736 100644 --- a/doc/user-guide/io.rst +++ b/doc/user-guide/io.rst @@ -897,7 +897,8 @@ where the data should be written (in index space, not label space), e.g., ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)}) Concurrent writes with ``region`` are safe as long as they modify distinct -chunks in the underlying Zarr arrays (or use an appropriate ``lock``). +chunks in the underlying Zarr arrays (or use an appropriate ``lock``). +Note that incorrectly (or omitting) setting the ``chunksizes`` for the initial Zarr file results in a partial update of the chunks when writing to regions, causing missing values in the Zarr file. As a safety check to make it harder to inadvertently override existing values, if you set ``region`` then *all* variables included in a Dataset must have From b92c693e3fdb5857c834e7b51d0a0786dc4ad88e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:14:32 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/user-guide/io.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user-guide/io.rst b/doc/user-guide/io.rst index 30f54d3f736..23b6c4d1188 100644 --- a/doc/user-guide/io.rst +++ b/doc/user-guide/io.rst @@ -897,7 +897,7 @@ where the data should be written (in index space, not label space), e.g., ds.isel(x=slice(20, 30)).to_zarr(path, region={"x": slice(20, 30)}) Concurrent writes with ``region`` are safe as long as they modify distinct -chunks in the underlying Zarr arrays (or use an appropriate ``lock``). +chunks in the underlying Zarr arrays (or use an appropriate ``lock``). Note that incorrectly (or omitting) setting the ``chunksizes`` for the initial Zarr file results in a partial update of the chunks when writing to regions, causing missing values in the Zarr file. As a safety check to make it harder to inadvertently override existing values,