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.
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
Updated WorldCerealInferenceDataset #103
Updated WorldCerealInferenceDataset #103
Changes from 18 commits
47034ac
d7d541e
5d6fe88
f0b1c8c
ce52f9c
1ac7ea2
906652e
1a19ec1
8ee5b47
3f75632
9155516
5f6b58d
794065e
817da45
666d05f
7f14c8c
70015af
eab0569
3eea359
4f9a18f
6547114
8ac58df
fab066c
6079001
2575d39
be7a31b
13f8433
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do we need
latlons
andlon, lat
here? If I understand correctly,lon == latlons[:, 1]
andlat == latlons[:, 0]
, which means we don't needlon, lat
?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.
It's not so simple I'm afraid, I struggled with this a lot. After the meshgrid and flattening of
latlons
it becomes quite hard to get back to originallon, lat
we need to properly reconstruct the DataArray.So no,
lon != latlons[:, 1]
. I've been thinking about easier ways but haven't found them as of yet.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.
hmm okay. I think this is probably (?) easier, especially considering we additionally apply the transformation. The latlons take up quite a bit of RAM, and for large tiles this might become an issue.
Just in case its useful here is some code to go from the flat latlons back to the original ones (but without the transformation):
I wonder if its worth passing around the original lats and lons and only applying that transformation right before the model ingests the values
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.
I hope i understood this well. Could you check if my latest commit address this the way you suggest it? Feel free to suggest to do it differently. Rest of the day, unfortunately I'm away. Will catch up tomorrow morning.