-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Enhancement]: Add X and Y bounds to 2d coordinates #676
Comments
@acordonez – could you point to an example dataset where this exists (or a dataset where this behavior would apply if you opened the dataset and then dropped the bounds via A couple things that might be considered for this enhancement:
|
@pochedls Regarding regridding, in my experience xcdat + xesmf cannot regrid this dataset without the bounds. I actually stumbled across this by trying to regrid a non-rectilinear dataset. |
Would a dataset like this work (if bounds are dropped): Thank you for clarifying on regridding. Since this issue would prevent a user from regridding, it seems like it would be useful to add functionality to add bounds for 2D coordinates. |
@pochedls Yes it looks like the file you suggested would reproduce this behavior if the bounds were dropped. |
Is your feature request related to a problem?
I don't see any similar issues. I would like the bounds.add_missing_bounds() function to be able to add bounds to two-dimensional coordinates.
Describe the solution you'd like
I've added a code example here to demonstrate.
Current result with xcdat:
Desired result:
Describe alternatives you've considered
This can be done with cf_xarray, as I've shown in my example. Because so many xcdat features require datasets to have bounds, however, I think it would be very helpful for xcdat to be able to add those bounds without asking the user to research and incorporate another library.
Another alternative would be to point users to cf_xarray for 2d bounds in the add_missing_bounds() documentation.
Additional context
Two dimensional coordinates are very common in ocean and sea ice datasets.
The text was updated successfully, but these errors were encountered: