pyesmda.approximate_covariance_matrix_from_ensembles¶
- pyesmda.approximate_covariance_matrix_from_ensembles(ensemble_1: ndarray[Any, dtype[float64]], ensemble_2: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[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 (npt.NDArray[np.float64]) – First ensemble of realization with diemnsions (\(N_{e}, N_{m1}\)).
ensemble_2 (npt.NDArray[np.float64]) – Second ensemble of realization with diemnsions (\(N_{e}, N_{m2}\)).
- Returns
The two ensembles approximated covariance matrix.
- Return type
npt.NDArray[np.float64]
- Raises
ValueError – _description_