diff --git a/pysteps/blending/steps.py b/pysteps/blending/steps.py index 1cffa8bd..4edb3929 100644 --- a/pysteps/blending/steps.py +++ b/pysteps/blending/steps.py @@ -3167,7 +3167,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,