Skip to content

Commit

Permalink
Change print function in check_norain function (#357)
Browse files Browse the repository at this point in the history
* Change print function in check_norain function

Minor print statement change to print the right information in the check_norain function in the blending.utils module.

* Restore one deleted line
  • Loading branch information
RubenImhoff authored Apr 29, 2024
1 parent 563de17 commit 4421193
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pysteps/blending/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ def check_norain(precip_arr, precip_thr=None, norain_thr=0.0):
precip_thr = np.nanmin(precip_arr)
rain_pixels = precip_arr[precip_arr > precip_thr]
norain = rain_pixels.size / precip_arr.size <= norain_thr
print("Field is below no rain fraction :", norain)
print("rain fraction is :", rain_pixels.size / precip_arr.size)
print(
f"Rain fraction is: {str(rain_pixels.size / precip_arr.size)}, while minimum fraction is {str(norain_thr)}"
)
return norain

0 comments on commit 4421193

Please sign in to comment.