Skip to content

Commit

Permalink
Added proposals of Danielle in pull request #379
Browse files Browse the repository at this point in the history
  • Loading branch information
sidekock committed Jul 17, 2024
1 parent 84bb003 commit dd39358
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pysteps/blending/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def forecast(
(currently it is 1 km/min), None=no masking.
smooth_radar_mask_range: int, Default is 0.
If 0 this generates a normal forecast. To create a smooth mask, this range
should be a positive value. The smooth radar mask for the radar removes
should be a positive value, representing a buffer band of a number of pixels
by which the mask is cropped and smoothed. The smooth radar mask removes
the hard edges between NWP and radar in the final blended product.
probmatching_method: {'cdf','mean',None}, optional
Method for matching the statistics of the forecast field with those of
Expand Down Expand Up @@ -1469,8 +1470,8 @@ def worker(j):
)

# Ensure mask values are between 0 and 1
mask_model = new_mask
mask_radar = 1 - new_mask
mask_model = np.clip(new_mask, 0, 1)
mask_radar = np.clip(1 - new_mask, 0, 1)

Check warning on line 1474 in pysteps/blending/steps.py

View check run for this annotation

Codecov / codecov/patch

pysteps/blending/steps.py#L1473-L1474

Added lines #L1473 - L1474 were not covered by tests

# Handle NaNs in R_f_new and R_f_new_mod_only by setting NaNs to 0 in the blending step
R_f_new_mod_only_no_nan = np.nan_to_num(

Check warning on line 1477 in pysteps/blending/steps.py

View check run for this annotation

Codecov / codecov/patch

pysteps/blending/steps.py#L1477

Added line #L1477 was not covered by tests
Expand Down

0 comments on commit dd39358

Please sign in to comment.