File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -1551,7 +1551,12 @@ def to_netcdf(
1551
1551
``dask.delayed.Delayed`` object that can be computed later.
1552
1552
Currently, ``compute=False`` is not supported.
1553
1553
kwargs :
1554
- Addional keyword arguments to be passed to ``xarray.Dataset.to_netcdf``
1554
+ Additional keyword arguments to be passed to ``xarray.Dataset.to_netcdf``
1555
+
1556
+ Note
1557
+ ----
1558
+ Due to file format specifications the on-disk root group name
1559
+ is always ``"/"`` overriding any given ``DataTree`` root node name.
1555
1560
"""
1556
1561
from xarray .core .datatree_io import _datatree_to_netcdf
1557
1562
@@ -1607,6 +1612,11 @@ def to_zarr(
1607
1612
supported.
1608
1613
kwargs :
1609
1614
Additional keyword arguments to be passed to ``xarray.Dataset.to_zarr``
1615
+
1616
+ Note
1617
+ ----
1618
+ Due to file format specifications the on-disk root group name
1619
+ is always ``"/"`` overriding any given ``DataTree`` root node name.
1610
1620
"""
1611
1621
from xarray .core .datatree_io import _datatree_to_zarr
1612
1622
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ To open a whole netCDF file as a tree of groups use the :py:func:`open_datatree`
24
24
To save a DataTree object as a netCDF file containing many groups, use the :py:meth: `DataTree.to_netcdf ` method.
25
25
26
26
27
+ .. _netcdf.root_group.note :
28
+
29
+ .. note ::
30
+ Due to file format specifications the on-disk root group name is always ``"/" ``,
31
+ overriding any given ``DataTree `` root node name.
32
+
27
33
.. _netcdf.group.warning :
28
34
29
35
.. warning ::
@@ -52,3 +58,8 @@ To save a DataTree object as a zarr store containing many groups, use the :py:me
52
58
.. note ::
53
59
Note that perfect round-tripping should always be possible with a zarr store (:ref: `unlike for netCDF files <netcdf.group.warning >`),
54
60
as zarr does not support "unused" dimensions.
61
+
62
+ For the root group the same restrictions (:ref: `as for netCDF files <netcdf.root_group.note >`) apply.
63
+ Due to file format specifications the on-disk root group name is always ``"/" ``
64
+ overriding any given ``DataTree `` root node name.
65
+
You can’t perform that action at this time.
0 commit comments