Go to the documentation of this file.
11 #ifndef OOPS_BASE_HYBRIDCOVARIANCE_H_
12 #define OOPS_BASE_HYBRIDCOVARIANCE_H_
16 #include "eckit/config/LocalConfiguration.h"
17 #include "eckit/exception/Exceptions.h"
26 #include "oops/util/DateTime.h"
27 #include "oops/util/Logger.h"
34 template <
typename MODEL>
42 const eckit::Configuration &,
const State_ &,
const State_ &);
50 std::unique_ptr< ModelSpaceCovarianceBase<MODEL> >
static_;
51 std::unique_ptr< EnsembleCovariance<MODEL> >
ensemble_;
60 template<
typename MODEL>
62 const eckit::Configuration & config,
66 eckit::LocalConfiguration(config,
"static"), resol, vars, xb, fg))
68 const eckit::LocalConfiguration ensConf(config,
"ensemble");
71 ensWeight_ = config.getDouble(
"ensemble weight");
73 staWeight_ = config.getDouble(
"static weight");
75 Log::trace() <<
"HybridCovariance created." << std::endl;
78 template<
typename MODEL>
80 Log::trace() <<
"HybridCovariance destructed" << std::endl;
83 template<
typename MODEL>
85 static_->multiply(dxi, dxo);
88 ensemble_->multiply(dxi, tmp);
89 dxo.
axpy(ensWeight_, tmp);
92 template<
typename MODEL>
96 GMRESR(dxo, dxi, *
this, Id, 10, 1.0e-3);
99 template<
typename MODEL>
101 throw eckit::NotImplemented(
"HybridCovariance::doRandomize: Would it make sense?", Here());
106 #endif // OOPS_BASE_HYBRIDCOVARIANCE_H_
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)
void zero()
Linear algebra operators.
void doRandomize(Increment_ &) const override
void axpy(const double &, const Increment &, const bool check=true)
Generic ensemble based model space error covariance.
HybridCovariance(const Geometry_ &, const Variables &, const eckit::Configuration &, const State_ &, const State_ &)
Constructor, destructor.
void doInverseMultiply(const Increment_ &, Increment_ &) const override
Geometry class used in oops; subclass of interface class above.
Increment< MODEL > Increment_
Encapsulates the model state.
Geometry< MODEL > Geometry_
std::unique_ptr< EnsembleCovariance< MODEL > > ensemble_
Increment Class: Difference between two states.
Generic hybrid static-ensemble model space error covariance.
void doMultiply(const Increment_ &, Increment_ &) const override
std::unique_ptr< ModelSpaceCovarianceBase< MODEL > > static_