Skip to content

Commit b7c1c11

Browse files
authored
Forbid datatree to zarr append dim (#10156)
* new blank whatsnew * forbid trying to append a DataTree to an existing zarr store * release note
1 parent 1219109 commit b7c1c11

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

doc/whats-new.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ New Features
2626
Breaking changes
2727
~~~~~~~~~~~~~~~~
2828

29+
- Explicitly forbid appending a :py:class:`~xarray.DataTree` to zarr using :py:meth:`~xarray.DataTree.to_zarr` with ``append_dim``, because the expected behaviour is currently undefined.
30+
(:issue:`9858`, :pull:`10156`)
31+
By `Tom Nicholas <https://github.com/TomNicholas>`_.
2932

3033
Deprecations
3134
~~~~~~~~~~~~

xarray/core/datatree_io.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ def _datatree_to_zarr(
103103
"specifying a root group for the tree has not been implemented"
104104
)
105105

106+
if "append_dim" in kwargs:
107+
raise NotImplementedError(
108+
"specifying ``append_dim`` with ``DataTree.to_zarr`` has not been implemented"
109+
)
110+
106111
if encoding is None:
107112
encoding = {}
108113

0 commit comments

Comments
 (0)