-
Notifications
You must be signed in to change notification settings - Fork 7
Fix "RuntimeError: Example is wrong shape" #412
Conversation
| zarr_path, engine="zarr", consolidated=consolidated, mode="r", chunks=None | ||
| ) | ||
|
|
||
| ukv = nwp["UKV"] |
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.
is the reversing needed for other channels?
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 may have miss understood here - UKV might not be a channel. Perhaps add a comment why "UKV" is selected
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.
Ah, yes, good point! UKV is the name of the (one and only) DataArray in the Zarr Dataset. You're right, UKV isn't a channel. UKV is the name of the DataArray which holds all the channels (the channels are represented as a dimension in the DataArray). I'll add a comment! Thanks!
peterdudfield
left a comment
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.
Looks good.
- just a small comment
- looks like a few conflicts, but im sure you can merge main into this first
Pull Request
PLEASE NOTE THAT THERE ARE ONLY TWO SMALL CHANGES IN THIS PR IN
nwp_data_source.py: HERE AND HEREThe reason GitHub says 7 files have changed is because I merged a bunch of other bug fixes into this branch. Specifically:
Good news:
prepare_ml_data.pynow creates NWP batches! And fairly fast, too (about 1 per second).Fixes #410
How Has This Been Tested?
prepare_ml_data.pyruns successfullyChecklist: