xarray.load_datatree#

xarray.load_datatree(filename_or_obj, **kwargs)[source]#

Open, load into memory, and close a DataTree from a file or file-like object.

This is a thin wrapper around open_datatree(). It differs from open_datatree in that it loads the DataTree into memory, closes the file, and returns the DataTree. In contrast, open_datatree keeps the file handle open and lazy loads its contents. All parameters are passed directly to open_datatree. See that documentation for further details.

Returns:

datatree (DataTree) – The newly created DataTree.

See also

open_datatree