Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DataTree in xarray.concat #9778

Open
shoyer opened this issue Nov 13, 2024 · 2 comments
Open

Support DataTree in xarray.concat #9778

shoyer opened this issue Nov 13, 2024 · 2 comments
Labels
enhancement topic-combine combine/concat/merge topic-DataTree Related to the implementation of a DataTree class

Comments

@shoyer
Copy link
Member

shoyer commented Nov 13, 2024

What is your issue?

Something like this works, but is a little awkward -- especially the skipping over dimensions that are only defined on some node levels:

def concat(*datasets, dim):
    if not all(dim in ds.dims for ds in datasets):
        return None
    return xarray.concat(*datasets, dim=dim)

xarray.map_over_datasets(concat, tree1, tree)
@shoyer shoyer added the needs triage Issue that has not been reviewed by xarray team member label Nov 13, 2024
@TomNicholas
Copy link
Member

I agree - but I think this issue is a duplicate of #9106.

@TomNicholas TomNicholas added plan to close May be closeable, needs more eyeballs and removed needs triage Issue that has not been reviewed by xarray team member labels Nov 14, 2024
@TomNicholas TomNicholas added enhancement topic-combine combine/concat/merge topic-DataTree Related to the implementation of a DataTree class and removed plan to close May be closeable, needs more eyeballs labels Nov 14, 2024
@TomNicholas
Copy link
Member

Gonna keep this open as a small sub-issue that's part of the checklist in #9106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement topic-combine combine/concat/merge topic-DataTree Related to the implementation of a DataTree class
Projects
None yet
Development

No branches or pull requests

2 participants