What is your issue?
Consider the following two data trees:
one = DataTree.from_dict(
{
"/": xr.Dataset(coords={"a": 1}),
"/b": xr.Dataset(coords={"a": 1}),
}
)
two = DataTree.from_dict(
{
"/": xr.Dataset(coords={"a": 1}),
"/b": xr.Dataset(),
}
)
Currently, DataTree.identical() considers one and two to be identical, but the coordinate a is defined redundantly in the first tree.
For most purposes, these DataTree objects are identical, but are edge cases where it could be different, e.g., when wrting these trees to netCDF or Zarr.
It would be helpful if the .identical() checked for such discrepancies, e.g., to facilitate writing unit tests as in #9214.