mesmer.calibrate_mesmer.train_lv_find_localized_ecov(y, wgt_scen_eq, aux, cfg)#

Find suitable localization radius for empirical covariance matrix and derive localized empirical cov matrix.

  • y (np.ndarray) – 2d array (sample, gp) of specific target

  • wgt_scen_eq (np.ndarray) – 1d array (sample) of sample weights

  • aux (dict) – provides auxiliary variables needed for lv method at hand

    • [“phi_gc”] (dict with localisation radii as keys and each containing a 2d array (gp, gp) of of Gaspari-Cohn correlation matrix

  • cfg (module) – config file containing metadata


  • localized_empirical_covariance (xr.Dataset) – Dataset containing three DataArrays:

  • localization_radius (float) – Selected localization radius.

  • covariance (xr.DataArray) – Empirical covariance matrix.

  • localized_covariance (xr.DataArray) – Localized empirical covariance matrix.


  • Function could also handle determining ecov of several variables but would all have to be passed in same 2d y array (with corresponding wgt_scen_eq, aux[“phi_gc”] shapes)