From 484d1ce5ff8969b6ca6fa942b344379725f33b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ponte?= Date: Wed, 20 May 2020 20:55:32 +0200 Subject: [PATCH] improve to_zarr doc about chunking (#4048) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update dataset.py * attempt at improving the doc formulation * update to_zarr docstring * minor style update * seems to fix doc compilation locally * delete saved_on_disk.nc Co-authored-by: Aurélien Ponte --- xarray/core/dataset.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 3a55f3eca27..d93f4044a6d 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -1604,6 +1604,15 @@ def to_zarr( References ---------- https://zarr.readthedocs.io/ + + Notes + ----- + Zarr chunking behavior: + If chunks are found in the encoding argument or attribute + corresponding to any DataArray, those chunks are used. + If a DataArray is a dask array, it is written with those chunks. + If not other chunks are found, Zarr uses its own heuristics to + choose automatic chunk sizes. """ if encoding is None: encoding = {}