-
Notifications
You must be signed in to change notification settings - Fork 22
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
Search for coord_names in separate_coords #191
Conversation
ayushnag
commented
Jul 15, 2024
•
edited
Loading
edited
- Closes open_virtual_dataset returns some coordinates as data variables #189
- Added tests
- Tests passing
- Full type hint coverage
@TomNicholas this closes the issue however I think there is some existing functionality that can be refactored. My understanding is that the current logic is trying to find coordinates within attrs here. However this is accessing the dataset attributes whereas |
That would be great @ayushnag. I think the presence of the We should also do a few other things:
|
@ayushnag I would like to merge this important bugfix and issue a release of a new version of virtualizarr. Are you likely to have time to come back to this or should I merge this PR and open another? |
@TomNicholas I was looking into this some more and it seems that the I unfortunately don't have time to implement your new suggestions but you can feel free to merge this or make an updated PR. |
@TomNicholas I do have some time to add tests and get this merged. The current fix is in |
That would be great! Test_backends would be fine I think. |
Great! Do you have an example netcdf that has some coordinates where CF decoding is required? It would be ideal to have a test that checks all three cases where two should pass after this PR and I can mark the third CF case as If there isn't one to easily download I can manually construct one, I just need to know the cases where CF decoding is needed |
I think another one of the Xarray tutorial datasets (the roms one) might have this property. Does my half-finished PR to make (3) work include one? |
I tested this change with ROMS_example and it does pass with just this PR. Your PR used the ROM_example as well |
Ah damn. Well we can just leave this for another PR. If you do want to go further down the rabbit hole I think that one example of CF metadata that would cause Xarray to set extra variables as coordinates is when one variable has a @sharkinsspatial maybe you know this bit of CF lore? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @ayushnag !
* add new section to release notes for unreleased additions * add release note for #191 * add release note for #266 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * pre-commit --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>