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

What to do with multiple axis variables? #13

Closed
dcherian opened this issue Jun 3, 2020 · 1 comment · Fixed by #27
Closed

What to do with multiple axis variables? #13

dcherian opened this issue Jun 3, 2020 · 1 comment · Fixed by #27

Comments

@dcherian
Copy link
Contributor

dcherian commented Jun 3, 2020

  1. If a Dataset has multiple variables tagged with axis="X", we could raise an error.
  2. ds.cf.isel(X=5) could select along multiple dimensions tagged with axis="X". See Add .sel and .isel equivalent that returns all vars on all grids related to the indexers? xgcm/xgcm#200 . This seems like a good idea to me.
@dcherian dcherian changed the title Dataset.cf.__getitem__ errors for multiple axis variables What to do with multiple axis variables? Jun 3, 2020
@dcherian
Copy link
Contributor Author

dcherian commented Jun 12, 2020

  1. I think the solution here is for Dataset to always return a Dataset with all possible X variables.
    For DataArrays multiple X variables raise an error. This could be changed. This is implemented in Look for & prioritize "coordinates" attribute when searching. #16

dcherian added a commit to dcherian/cf-xarray that referenced this issue Jun 12, 2020
.isel(X=5, Y=5) → .isel(xi_rho=5, xi_u=5, xi_v=5, eta_rho=10, ...)

Closes xarray-contrib#13
dcherian added a commit that referenced this issue Jun 12, 2020
* Allow expanding single keys to multiple keys.

.isel(X=5, Y=5) → .isel(xi_rho=5, xi_u=5, xi_v=5, eta_rho=10, ...)

Closes #13

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant