pyPDAF.PDAF.local_weights¶
- pyPDAF.PDAF.local_weights()¶
This function returns a vector of the localisation weights based on distance and localisation functions and radii. This function is particularly useful for mannually apply covariance localisations for state or observation errors.
- Parameters:
wtype (int) – Type of weight function (0): unit weight (=1 up to distance=cradius) (1): exponential decrease (1/e at distance=sradius; 0 for distance>cradius) (2): 5th order polynomial (Gaspari&Cohn 1999; 0 for distance>cradius)
cradius (float) – Parameter for cut-off
sradius (float) – Support radius
distance (ndarray[tuple[dim], np.float64]) –
Array holding distances
The array dimension dim is Size of distance and weight arrays.
verbose (int) – Verbosity flag
- Returns:
weight – Array for weights
The array dimension dim is Size of distance and weight arrays
- Return type:
ndarray[tuple[dim], np.float64]