Fix 'viirs_edr' renaming two sets of dimensions to the same names #2707
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So this wasn't actually a problem until xarray 2023.9.0 where something changed to be more strict about dimensions and coordinates. This also wasn't failing in tests because my tests assume the ideal case of the file metadata. The real files however seem to have incorrect coordinates for some variables:
Obviously the 750m data should not be pointing to the 375m lon/lat variables as coordinates. This was made worse by my renaming in
__init__
from both sets of dimensions (375m and 750m) to the same name "y" and "x". This PR switches that renaming to happen per DataArray. Note I am not testing this particular case with bad coordinate names because I believe the algorithm developers have been told and the file coordinates should get fixed...hopefully.