8 #ifndef OOPS_BASE_STATEENSEMBLE4D_H_
9 #define OOPS_BASE_STATEENSEMBLE4D_H_
14 #include "eckit/config/LocalConfiguration.h"
19 #include "oops/util/Logger.h"
51 template<
typename MODEL>
53 const eckit::Configuration & config)
55 std::vector<eckit::LocalConfiguration> memberConfig;
56 config.get(
"members", memberConfig);
57 states_.reserve(memberConfig.size());
59 for (
size_t jj = 0; jj < memberConfig.size(); ++jj) {
62 Log::trace() <<
"StateEnsemble4D:contructor done" << std::endl;
67 template<
typename MODEL>
72 const double rr = 1.0/
static_cast<double>(states_.size());
73 for (
size_t iens = 0; iens < states_.size(); ++iens) {
74 ensmean.
accumul(rr, states_[iens]);
77 Log::trace() <<
"StateEnsemble4D::mean done" << std::endl;
78 return std::move(ensmean);
void accumul(const double &zz, const FLDS &xx)
Geometry class used in oops; subclass of interface class interface::Geometry.
Four dimensional state (vector of 3D States)
const State4D_ & operator[](const int ii) const
Geometry< MODEL > Geometry_
State4D_ & operator[](const int ii)
const Variables & variables() const
Information.
State4D< MODEL > State4D_
State4D_ mean() const
calculate ensemble mean
unsigned int size() const
Accessors.
std::vector< State4D_ > states_
StateEnsemble4D(const Geometry_ &, const eckit::Configuration &)
Create ensemble of 4D states.
The namespace for the main oops code.