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

Concatenate datasets when some variables are present in one dataset and not present in other dataset #144

Open
andersy005 opened this issue Oct 15, 2019 · 3 comments
Labels
needs triage This can be kept if the triager is unsure which next steps to take

Comments

@andersy005
Copy link
Member

Currently, xarray.concat() doesn't know how to deal with datasets for which one dataset contains some variables and these same variables are not present in the rest of the datasets to concatenate.

To address this issue, there are two options:

  • Add NaNs by determining the set of variables that are not in all datasets but at least in one dataset
    and use .full_like(..., fill_value=np.nan) to add the variables not present in the other dataset (
  • Dropping the problematic variables
    Either option would probably need to be done prior calling xr.concat() in join_new() and join_existing() introduced in Rewrite intake-esm's core based on ESM Collection Specification #135
@dcherian
Copy link
Collaborator

dcherian commented Oct 15, 2019

Upstream issue: pydata/xarray#508

This would be a relatively easy fix in concat if you're up for it. I'm happy to help.

@andersy005
Copy link
Member Author

Sure. I will try working on this during the CMIp6 hackathon

@dcherian
Copy link
Collaborator

See pydata/xarray#3545. It could use some real world testing if you have the time...

@andersy005 andersy005 added the needs triage This can be kept if the triager is unsure which next steps to take label May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage This can be kept if the triager is unsure which next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants