diff --git a/pysteps/downscaling/rainfarm.py b/pysteps/downscaling/rainfarm.py index d9906390d..b40e359df 100644 --- a/pysteps/downscaling/rainfarm.py +++ b/pysteps/downscaling/rainfarm.py @@ -157,7 +157,7 @@ def compute_psd(array, fft_size): ) # Inverse FFT to obtain the merged array in the spatial domain - merged = np.real(np.fft.ifftn(fft_merged)) / len(fft_merged) + merged = np.real(np.fft.ifftn(fft_merged)) / fft_merged.size return merged