Tom Nicholas
Tom Nicholas
@pbranson thanks for your ideas about integration of datatree with the intake ecosystem, this is definitely something I'm really interested in, and a potential use case I had in mind...
The ability to open a set of intake catalogs as a `DataTree` was actually added to intake-esm in https://github.com/intake/intake-esm/pull/512 by @mgrover! Separately it's also been suggested that we might want...
> In the case of save_mfdatatree, where would it save the global and group level attributes? > > Each file preserves the upper levels. I think this is what I...
> do not look at parent Did you get a `RecursionError` when you tried to close the parent too? I've done that before :sweat_smile: This seems good though. For testing...
> I've added open=True/False to the repr. Not sure if this is the best way to go though. What do you think? Hmmm... that seems a bit janky to me,...
The reason fixing this is complicated is that `Dataset` doesn't actually store `DataArray` objects, instead it stores lower-level `Variable` objects, which are unnamed. It then recreates a new `DataArray` object...
@shoyer wondering if you have an opinions on this? Do you think this name behaviour is a subtle but important feature of xarray or a unimportant detail?
Okay I **think** a design like this would work, where `DataNode` is analogous to `Variable` in that it's a private internal class that contains data but doesn't know it's own...
Alternatively Stephan suggested today that this might be achieved just by ensuring that group insertion occurs by making a shallow copy instead.
Thanks for catching this @keewis ! Looks like I forgot to write a unit test for this intended behaviour and so never implemented it :sweat_smile: I think your solution is...