pyPDAF.PDAF.local_weight

pyPDAF.PDAF.local_weight()

The function is used for localisation in the analysis step of a filter and computes a weight according to the specified distance and the settings for the localising function. Typically the function is called in py__prodRinvA_l_pdaf in the domain-localised filters. Also, the function is typically called for the LEnKF in the py__localize_covar_pdaf. This function is usually only used in user-codes that do not use PDAF-OMI.

Parameters:
  • wtype (int) – Type of weight function

  • rtype (int) – Type of regulated weighting

  • cradius (float) – Cut-off radius (check PDAF-OMI wiki)

  • sradius (float) –

    Support radius (check PDAF-OMI wiki)

  • distance (float) – Distance to observation

  • A (ndarray[tuple[nrows, ncols], np.float64]) –

    Input matrix

    The1st-th dimension nrows is Number of rows in matrix A; the2nd-th dimension ncols is Number of columns in matrix A.

  • var_obs (float) – Observation variance

  • verbose (int) – Verbosity flag

Returns:

weight – Weights

Return type:

float