-
Notifications
You must be signed in to change notification settings - Fork 41
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
Preferred way to deal with indexed coordinates? #107
Comments
So
This (more general problem) is a little tricky. In this case, I would like BUT I had a similar issue recently where there is a I am not sure on how to cleanly solve this. |
Ok this will do the job for me for now. Thanks for pointing it out. |
Reopening for
|
I would also prefer that _get_axis_coord only consider dimension names. |
I think the solution here is to refactor
|
Actually now that most of the time we are using
where each of those functions returns the intersection of Then we use those mappers appropriately ... There's probably some outlier case where two functions use the same kwarg name but one needs dims but the other needs coords. If so, we can fix this by explicitly adding those functions to the accessor. |
xref #174 (comment) Another fundamental issue is whether Maybe all properties should return names present in all variables (not just data variables), and we can add an FAQ showing people how to use set operations to pull out what's needed? |
What is the preferred way to deal with the following situation?
So, a specific time is chosen in the model output. In the first example, the time is retained in the DataArray as a coordinate that has no dimension (see next pic)
When the time is retained, the DataArray has a "T" axis picked up by cf-xarray. However, there isn't actually a dimension of time in this DataArray, so I would get an error if I tried to transpose the T array based on what is returned from
cf.axes
.In the second case in the first pic, I can drop the coordinate that was indexed on with
drop=True
to avoid the "T" axis being identified. However, this is sort of annoying to need to make sure people do, and it then also loses the information of which time is being used.Is there a reasonable around this in cf-xarray? Should an Axis or Coordinate not be identified if it has no shape/dimension/something?
The text was updated successfully, but these errors were encountered: