pysteps.noise#
Implementation of deterministic and ensemble nowcasting methods.
pysteps.noise.interface#
Interface for the noise module.
|
Return two callable functions to initialize and generate 2d perturbations of precipitation or velocity fields. |
pysteps.noise.fftgenerators#
Methods for noise generators based on FFT filtering of white noise.
The methods in this module implement the following interface for filter initialization depending on their parametric or nonparametric nature:
initialize_param_2d_xxx_filter(field, **kwargs)
or:
initialize_nonparam_2d_xxx_filter(field, **kwargs)
where field is an array of shape (m, n) or (t, m, n) that defines the target field and optional parameters are supplied as keyword arguments.
The output of each initialization method is a dictionary containing the keys field and input_shape. The first is a two-dimensional array of shape (m, int(n/2)+1) that defines the filter. The second one is the shape of the input field for the filter.
The methods in this module implement the following interface for the generation of correlated noise:
generate_noise_2d_xxx_filter(field, randstate=np.random, seed=None, **kwargs)
where field (m, n) is a filter returned from the corresponding initialization method, and randstate and seed can be used to set the random generator and its seed. Additional keyword arguments can be included as a dictionary.
The output of each generator method is a two-dimensional array containing the field of correlated noise cN of shape (m, n).
|
Takes one ore more 2d input fields, fits two spectral slopes, beta1 and beta2, to produce one parametric, global and isotropic fourier filter. |
|
Takes one ore more 2d input fields and produces one non-parametric, global and anisotropic fourier filter. |
Function to compute the local Fourier filters using a nested approach. |
|
|
Function to compute the local Fourier filters using the Short-Space Fourier filtering approach. |
|
Produces a field of correlated noise using global Fourier filtering. |
|
Function to compute the locally correlated noise using a nested approach. |
pysteps.noise.motion#
Methods for generating perturbations of two-dimensional motion fields.
The methods in this module implement the following interface for initialization:
inizialize_xxx(V, pixelsperkm, timestep, optional arguments)
where V (2,m,n) is the motion field and pixelsperkm and timestep describe the spatial and temporal resolution of the motion vectors. The output of each initialization method is a dictionary containing the perturbator that can be supplied to generate_xxx.
The methods in this module implement the following interface for the generation of a motion perturbation field:
generate_xxx(perturbator, t, randstate=np.random, seed=None)
where perturbator is a dictionary returned by an initialize_xxx method. Optional random generator can be specified with the randstate and seed arguments, respectively. The output of each generator method is an array of shape (2,m,n) containing the x- and y-components of the motion vector perturbations, where m and n are determined from the perturbator.
Return a tuple containing the default velocity perturbation parameters given in [BPS06] for the parallel component. |
|
Return a tuple containing the default velocity perturbation parameters given in [BPS06] for the perpendicular component. |
|
|
Initialize the motion field perturbator described in [BPS06]. |
|
Generate a motion perturbation field by using the method described in [BPS06]. |
pysteps.noise.utils#
Miscellaneous utility functions related to generation of stochastic perturbations.
|
Apply a scale-dependent adjustment factor to the noise fields used in STEPS. |