8 #ifndef OOPS_BASE_OBSENSEMBLE_H_
9 #define OOPS_BASE_OBSENSEMBLE_H_
15 #include "oops/util/Logger.h"
44 template<
typename OBS>
46 : obsdb_(obsdb), ensemble_()
49 for (
size_t iens = 0; iens < nens ; ++iens) {
52 Log::trace() <<
"ObsEnsemble created" << std::endl;
57 template<
typename OBS>
61 for (
const auto & yy : ensemble_) {
64 mean_obs *= 1.0/
static_cast<float>(ensemble_.size());
65 Log::trace() <<
"ObsEnsemble::mean done" << std::endl;
Ensemble of observations (can hold ensemble of H(x))
const Observations_ & operator[](const size_t ii) const
std::vector< Observations_ > ensemble_
Observations_ & operator[](const size_t ii)
Observations< OBS > Observations_
Observations_ mean() const
Compute ensemble mean.
size_t size() const
Accessors and size.
ObsSpaces< OBS > ObsSpaces_
const ObsSpaces_ & obsdb_
ObsEnsemble(const ObsSpaces_ &, const size_t &nens)
Create ensemble of empty Observations size nens.
void accumul(const Observations &)
The namespace for the main oops code.