11 #ifndef OOPS_BASE_ENSEMBLECOVARIANCE_H_ 12 #define OOPS_BASE_ENSEMBLECOVARIANCE_H_ 14 #include <boost/scoped_ptr.hpp> 16 #include "eckit/config/LocalConfiguration.h" 27 #include "oops/util/abor1_cpp.h" 28 #include "oops/util/DateTime.h" 29 #include "oops/util/Logger.h" 36 template <
typename MODEL>
48 const eckit::Configuration &,
const State_ &,
const State_ &);
58 boost::scoped_ptr<Localization_>
loc_;
65 template<
typename MODEL>
67 const eckit::Configuration &
conf,
70 time_(
conf.getString(
"date")), loc_()
72 Log::trace() <<
"EnsembleCovariance::EnsembleCovariance start" << std::endl;
74 ASSERT(
xb.validTime() ==
time_);
76 ens_k->linearize(
xb, fg, resol);
79 const eckit::LocalConfiguration confloc(
conf,
"localization");
81 Log::trace() <<
"EnsembleCovariance::EnsembleCovariance done" << std::endl;
84 template<
typename MODEL>
86 Log::trace() <<
"EnsembleCovariance destructed." << std::endl;
89 template<
typename MODEL>
98 for (
unsigned int m = 0;
m < e_k1->size(); ++
m) {
105 dxo.
axpy(1.0, dx,
false);
109 template<
typename MODEL>
114 GMRESR(dxo, dxi, *
this, Id, 10, 1.0
e-3);
117 template<
typename MODEL>
119 ABORT(
"EnsembleCovariance::randomize: Would it make sense?");
124 #endif // OOPS_BASE_ENSEMBLECOVARIANCE_H_ double GMRESR(VECTOR &xx, const VECTOR &bb, const AMATRIX &A, const PMATRIX &precond, const int maxiter, const double tolerance)
boost::scoped_ptr< Localization_ > loc_
const util::DateTime time_
Generic ensemble based model space error covariance.
void doInverseMultiply(const Increment_ &, Increment_ &) const override
const util::DateTime validTime() const
Time.
void zero()
Linear algebra operators.
EnsemblesCollection< MODEL > EnsemblesCollection_
static EnsemblesCollection< MODEL > & getInstance()
Localization< MODEL > Localization_
Encapsulates the model state.
Geometry< MODEL > Geometry_
The namespace for the main oops code.
real(fp), parameter, public e
Abstract base class for model space error covariances.
void axpy(const double &, const Increment &, const bool check=true)
EnsembleCovariance(const Geometry_ &, const Variables &, const eckit::Configuration &, const State_ &, const State_ &)
Constructor, destructor.
Increment Class: Difference between two states.
void randomize(Increment_ &) const override
Increment< MODEL > Increment_
void doMultiply(const Increment_ &, Increment_ &) const override
boost::shared_ptr< StateEnsemble< MODEL > > EnsemblePtr_
StateEnsemble< MODEL > Ensemble_
void schur_product_with(const Increment &)