pyesmda.approximate_covariance_matrix_from_ensembles

pyesmda.approximate_covariance_matrix_from_ensembles(ensemble_1: numpy.ndarray[Any, numpy.dtype[numpy.float64]], ensemble_2: numpy.ndarray[Any, numpy.dtype[numpy.float64]]) numpy.ndarray[Any, numpy.dtype[numpy.float64]][source]

Approximate the covariance matrix between two ensembles in the EnKF way.

The covariance matrice \(C_{m1m2}\) is approximated from the ensemble in the standard way of EnKF [Evensen, 2007, Aanonsen et al., 2009]:

\[C_{p1p2} = \frac{1}{N_{e} - 1} \sum_{j=1}^{N_{e}}\left(m1_{j} - \overline{m1}\right)\left(m2_{j} - \overline{m2} \right)^{T}\]
Parameters
  • ensemble_1 (NDArrayFloat) – First ensemble of realization with diemnsions (\(N_{e}, N_{m1}\)).

  • ensemble_2 (NDArrayFloat) – Second ensemble of realization with diemnsions (\(N_{e}, N_{m2}\)).

Returns

The two ensembles approximated covariance matrix.

Return type

NDArrayFloat

Raises

ValueError – _description_