pysteps.downscaling.rainfarm.downscale

Contents

pysteps.downscaling.rainfarm.downscale#

pysteps.downscaling.rainfarm.downscale(precip, ds_factor, alpha=None, threshold=None, return_alpha=False, kernel_type=None, spectral_fusion=False)#

Downscale a rainfall field by increasing its spatial resolution by a positive integer factor.

Parameters:
  • precip (array_like) – Array of shape (m, n) containing the input field. The input is expected to contain rain rate values. All values are required to be finite.

  • alpha (float, optional) – Spectral slope. If None, the slope is estimated from the input array.

  • ds_factor (positive int) – Downscaling factor, it specifies by how many times to increase the initial grid resolution.

  • threshold (float, optional) – Set all values lower than the threshold to zero.

  • return_alpha (bool, optional) – Whether to return the estimated spectral slope alpha.

  • kernel_type ({None, "gaussian", "uniform", "tophat"}) – The name of the smoothing operator. If None no smoothing is applied.

  • spectral_fusion (bool, optional) – Whether to apply spectral merging as in [DOnofrioPvH+14].

Returns:

  • precip_highres (ndarray) – Array of shape (m * ds_factor, n * ds_factor) containing the downscaled field.

  • alpha (float) – Returned only when return_alpha=True.

Notes

Currently, the pysteps implementation of RainFARM only covers spatial downscaling. That is, it can improve the spatial resolution of a rainfall field. However, unlike the original algorithm from Rebora et al. (2006), it cannot downscale the temporal dimension. It implements spectral merging from D’Onofrio et al. (2014).

References

[RFvHP06] [DOnofrioPvH+14]