Skip to content

Conversation

ladc
Copy link
Contributor

@ladc ladc commented Aug 23, 2024

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:
control_ens_mean_obs

@RubenImhoff
Copy link
Contributor

Fantastic, @ladc! I will have a look at it after the weekend. :)

@ladc
Copy link
Contributor Author

ladc commented Aug 23, 2024

Thanks! There's still somewhat of a jump, but not sure if we can entirely avoid it.

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.00%. Comparing base (b4b41a5) to head (df2ce0e).
Report is 1 commits behind head on master.

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     
Flag Coverage Δ
unit_tests 84.00% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dnerini
Copy link
Member

dnerini commented Aug 23, 2024

Quick thought: would it perhaps help to simply "fade in" in few time steps after t0 from zeros to the NWP values outside the radar mask? This way, you would ensure a smooth transition

Edit: on a second thought and more careful read, you're approach achieves the same in a more elegant way, way to go!

Copy link
Member

@dnerini dnerini left a 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!

Copy link
Contributor

@RubenImhoff RubenImhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @ladc! Besides @dnerini's comments, I've nothing to add. I think this will do it for now. :)

Copy link
Contributor Author

@ladc ladc left a 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.

@ladc
Copy link
Contributor Author

ladc commented Aug 26, 2024

Here's just a final animation with and without the smoothing between nwc and nwp (mask boundary fix by Simon)
row 1: "control" (other branch, not yet finished) - member - mean (without smoothing)
row 2: observation - member with smoothing - mean with smoothing

control_ens_mean_obs_enssmooth_meansmooth

@ladc ladc merged commit b665ca9 into master Aug 26, 2024
@ladc ladc deleted the probmatch_ignore_nodata branch August 26, 2024 22:30
@ladc ladc self-assigned this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants