From e6cc2da2fb2952b16d1ffd7027831cac2071e879 Mon Sep 17 00:00:00 2001 From: Mats Veldhuizen Date: Tue, 4 Aug 2026 11:25:33 +0200 Subject: [PATCH] fix: only zeros in external nowcast --- pysteps/blending/steps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysteps/blending/steps.py b/pysteps/blending/steps.py index 2d153510..ae0d85fe 100644 --- a/pysteps/blending/steps.py +++ b/pysteps/blending/steps.py @@ -3152,7 +3152,7 @@ def __post_process_output( # areas with the "..._mod_only" blended forecasts, consisting # of the NWP and noise components. nan_indices = np.isnan(worker_state.final_blended_forecast_recomposed) - if self.__config.smooth_radar_mask_range != 0: + if self.__config.smooth_radar_mask_range != 0 and np.any(nan_indices): # Compute the smooth dilated mask new_mask = blending.utils.compute_smooth_dilated_mask( nan_indices,