Go to the documentation of this file.
11 #ifndef OOPS_BASE_ENSEMBLECOVARIANCE_H_
12 #define OOPS_BASE_ENSEMBLECOVARIANCE_H_
17 #include "eckit/config/LocalConfiguration.h"
18 #include "eckit/exception/Exceptions.h"
28 #include "oops/util/Logger.h"
35 template <
typename MODEL>
46 const eckit::Configuration &,
const State_ &,
const State_ &);
55 std::unique_ptr<Localization_>
loc_;
62 template<
typename MODEL>
64 const eckit::Configuration & conf,
68 Log::trace() <<
"EnsembleCovariance::EnsembleCovariance start" << std::endl;
70 if (conf.has(
"localization")) {
71 const eckit::LocalConfiguration confloc(conf,
"localization");
74 Log::trace() <<
"EnsembleCovariance::EnsembleCovariance done" << std::endl;
77 template<
typename MODEL>
79 Log::trace() <<
"EnsembleCovariance destructed." << std::endl;
82 template<
typename MODEL>
85 for (
unsigned int ie = 0; ie < ens_->size(); ++ie) {
92 dxo.
axpy(1.0, dx,
false);
96 dxo.
axpy(wgt, (*ens_)[ie],
false);
99 const double rk = 1.0/(
static_cast<double>(ens_->size()) - 1.0);
103 template<
typename MODEL>
107 GMRESR(dxo, dxi, *
this, Id, 10, 1.0e-3);
110 template<
typename MODEL>
112 throw eckit::NotImplemented(
"EnsembleCovariance::doRandomize: Would it make sense?", Here());
117 #endif // OOPS_BASE_ENSEMBLECOVARIANCE_H_
const util::DateTime validTime() const
Time.
The namespace for the main oops code.
double GMRESR(VECTOR &xx, const VECTOR &bb, const AMATRIX &A, const PMATRIX &precond, const int maxiter, const double tolerance)
Model-space localization base class.
std::unique_ptr< Localization_ > loc_
void zero()
Linear algebra operators.
std::shared_ptr< IncrementEnsemble< MODEL > > EnsemblePtr_
Geometry< MODEL > Geometry_
double dot_product_with(const Increment &) const
static std::unique_ptr< LocalizationBase< MODEL > > create(const Geometry_ &, const util::DateTime &, const eckit::Configuration &)
void axpy(const double &, const Increment &, const bool check=true)
Generic ensemble based model space error covariance.
void doInverseMultiply(const Increment_ &, Increment_ &) const override
Increment< MODEL > Increment_
LocalizationBase< MODEL > Localization_
EnsembleCovariance(const Geometry_ &, const Variables &, const eckit::Configuration &, const State_ &, const State_ &)
Constructor, destructor.
Geometry class used in oops; subclass of interface class above.
void doRandomize(Increment_ &) const override
void schur_product_with(const Increment &)
Encapsulates the model state.
Increment Class: Difference between two states.
void doMultiply(const Increment_ &, Increment_ &) const override
IncrementEnsemble< MODEL > Ensemble_