-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rename dims independently from coords? #3026
Comments
Yes, this would be really nice. We should have a separate |
Is there even any work-around at the moment? I could try a pull request, if I could figure it out. |
I am looking into this, but first I am making sure I understand the relationship between coordinates and dimensions. Could you give me an example of when you would use this functionality? |
Did you do something like this?/Is this what you are after but would like a cleaner solution? |
For example, you might have a rectilinear grid in a non-geodetic coordinate system, for example a rotated pole:
Obviously this case is a little more complicated, because x/y and lon/lat don't have a one-to-one correspondence. But I want to be able to write code that works with both cases, ideally without special casing stuff. Being able to have separately named dim and coordinate variables would help a lot. However, now that I look at this example, I guess in my case I have both x/y and lat/lon in the coordinates anyway, so maybe I should just duplicate them, with different names. |
Should we close this issue? |
I think |
I will submit a pull request to add separate rename dims and rename coords functions in a day or two. |
Created pull request #3042 |
This issue can be closed, and is addressed in pull request #3045 |
I have a dataset that looks like this:
Problem description
I would like to be able to rename the dataset dimensions, without renaming the coordinates.
Expected Output
As far as I can tell, there is no way to do this. I can
rename
the existing dims/coords to x/y, and then manually create new coordinates that are copies of x and y, which gets me to:But it doesn't seem to be possible to re-assign the new coordinates as the indexes for the existing dims.
In this case, it may seem a bit redundant, because the coordinates are equal to the grid. But I'm trying to get this output to work with code that also deals with other datasets that have non- rectilinear grids.
The text was updated successfully, but these errors were encountered: