-
Notifications
You must be signed in to change notification settings - Fork 184
Modify probability matching code to allow ignoring a part of the domain #428
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
Conversation
Error out if mask doesn't cover all nans
Especially with nans / ignore mask.
Fantastic, @ladc! I will have a look at it after the weekend. :) |
Thanks! There's still somewhat of a jump, but not sure if we can entirely avoid it. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #428 +/- ##
==========================================
+ Coverage 83.85% 84.00% +0.14%
==========================================
Files 160 160
Lines 12780 12882 +102
==========================================
+ Hits 10717 10821 +104
+ Misses 2063 2061 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Edit: on a second thought and more careful read, you're approach achieves the same in a more elegant way, way to go! |
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.
Some minor comments, looking good otherwise!
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.
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.
If all tests are green it's also good for me.
…or 2D data for pmatching
The resampling now allows the presence of nans. For pixel locations with a nan, both arrays are ignored.
The probability matching has an extra argument ignore_indices which are left untouched.
This functionality is added so that the values outside the radar mask, where there is only NWP data, don't affect the distribution of rainfall inside the mask.
In the case of high intensity in NWP but not in the radar for example, you'd otherwise get a huge jump in intensity due to the extremes affecting the radar nowcast area.
Result is in the top right and bottom left:
