8 #ifndef OOPS_BASE_DEPARTURESENSEMBLE_H_
9 #define OOPS_BASE_DEPARTURESENSEMBLE_H_
11 #include <Eigen/Dense>
18 #include "oops/util/Logger.h"
29 template <
typename DATA>
using ObsDataVec_ = std::vector<std::shared_ptr<ObsData_<DATA>>>;
49 template<
typename OBS>
51 : ensemblePerturbs_() {
53 for (
size_t iens = 0; iens < nens; ++iens) {
56 Log::trace() <<
"DeparturesEnsemble created" << std::endl;
61 template<
typename OBS>
63 std::size_t myNobs = ensemblePerturbs_[0].packEigenSize(mask);
64 std::size_t myNens = ensemblePerturbs_.size();
66 Eigen::MatrixXd depEns(myNens, myNobs);
67 for (std::size_t iens = 0; iens < myNens; ++iens) {
68 depEns.row(iens) = ensemblePerturbs_[iens].packEigen(mask);
70 Log::trace() <<
"DeparturesEnsemble::packEigen() completed" << std::endl;
Ensemble of Departures (can hold ensemble perturbations in the observation space)
const Departures_ & operator[](const size_t ii) const
Eigen::MatrixXd packEigen(const Departures_ &) const
pack ensemble of dep. as contiguous block of memory
size_t size() const
Accessors and size.
std::vector< std::shared_ptr< ObsData_< DATA > >> ObsDataVec_
ObsSpaces< OBS > ObsSpaces_
DeparturesEnsemble(const ObsSpaces_ &, const size_t nens)
Creates ensemble of empty Departures size nens.
Departures< OBS > Departures_
std::vector< Departures_ > ensemblePerturbs_
Departures_ & operator[](const size_t ii)
Difference between two observation vectors.
ObsDataVector is a vector templated on data type, in the observation space.
The namespace for the main oops code.