datatree/io.py
def open_mfdatatree(filepaths, rootnames: Sequence[PathType] = None, chunks=None, **kwargs) -> DataTree:
    """
    Open multiple files as a single DataTree.

    Groups found in each file will be merged at the root level, unless rootnames are specified,
    which will then be used to organise the Tree instead.
    """
    if rootnames is None:
        rootnames = ["/" for _ in filepaths]
    elif len(rootnames) != len(filepaths):
        raise ValueError

    full_tree = DataTree()

    for file, root in zip(filepaths, rootnames):
        dt = open_datatree(file, chunks=chunks, **kwargs)
        full_tree.set_node(path=root, node=dt, new_nodes_along_path=True, allow_overwrite=False)

    return full_tree

    Open multiple files as a single DataTree.

    Groups found in each file will be merged at the root level, unless rootnames are specified,
    which will then be used to organise the Tree instead.
    
Open multiple files as a single DataTree.
Groups found in each file will be merged at the root level, unless rootnames are specified,
which will then be used to organise the Tree instead.
Open multiple files as a single DataTree . Groups found in each file will be merged at the root level unless rootnames are specified which will then be used to organise the Tree instead .
def open_mfdatatree(filepaths, rootnames: Sequence[PathType] = None, chunks=None, **kwargs) -> DataTree:
    if rootnames is None:
        rootnames = ["/" for _ in filepaths]
    elif len(rootnames) != len(filepaths):
        raise ValueError
    full_tree = DataTree()
    for file, root in zip(filepaths, rootnames):
        dt = open_datatree(file, chunks=chunks, **kwargs)
        full_tree.set_node(path=root, node=dt, new_nodes_along_path=True, allow_overwrite=False)
    return full_tree
def open_mfdatatree ( filepaths , rootnames : Sequence [ PathType ] = None , chunks = None , ** kwargs ) -> DataTree : if rootnames is None : rootnames = [ "/" for _ in filepaths ] elif len ( rootnames ) != len ( filepaths ) : raise ValueError full_tree = DataTree ( ) for file , root in zip ( filepaths , rootnames ) : dt = open_datatree ( file , chunks = chunks , ** kwargs ) full_tree . set_node ( path = root , node = dt , new_nodes_along_path = True , allow_overwrite = False ) return full_tree
Open multiple files as a single DataTree.
Open multiple files as a single DataTree .
"""
    Open multiple files as a single DataTree.

    Groups found in each file will be merged at the root level, unless rootnames are specified,
    which will then be used to organise the Tree instead.
    """
filepaths
rootnames
Sequence[PathType]
chunks