11 #ifndef OOPS_BASE_HYBRIDCOVARIANCE_H_ 12 #define OOPS_BASE_HYBRIDCOVARIANCE_H_ 14 #include <boost/scoped_ptr.hpp> 16 #include "eckit/config/LocalConfiguration.h" 25 #include "oops/util/abor1_cpp.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_ &);
51 boost::scoped_ptr< ModelSpaceCovarianceBase<MODEL> >
static_;
52 boost::scoped_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 Log::trace() <<
"HybridCovariance created." << std::endl;
76 template<
typename MODEL>
78 Log::trace() <<
"HybridCovariance destructed" << std::endl;
81 template<
typename MODEL>
83 static_->multiply(dxi, dxo);
84 dxo *= (1.0-ensWeight_);
86 ensemble_->multiply(dxi,
tmp);
90 template<
typename MODEL>
94 GMRESR(dxo, dxi, *
this, Id, 10, 1.0
e-3);
97 template<
typename MODEL>
99 ABORT(
"HybridCovariance::randomize: Would it make sense?");
104 #endif // OOPS_BASE_HYBRIDCOVARIANCE_H_ Geometry< MODEL > Geometry_
double GMRESR(VECTOR &xx, const VECTOR &bb, const AMATRIX &A, const PMATRIX &precond, const int maxiter, const double tolerance)
Generic ensemble based model space error covariance.
boost::scoped_ptr< EnsembleCovariance< MODEL > > ensemble_
Increment< MODEL > Increment_
void doInverseMultiply(const Increment_ &, Increment_ &) const override
void doMultiply(const Increment_ &, Increment_ &) const override
void zero()
Linear algebra operators.
subroutine, public create(self, c_conf)
Encapsulates the model state.
The namespace for the main oops code.
boost::scoped_ptr< ModelSpaceCovarianceBase< MODEL > > static_
real(fp), parameter, public e
void randomize(Increment_ &) const override
Abstract base class for model space error covariances.
void axpy(const double &, const Increment &, const bool check=true)
Increment Class: Difference between two states.
HybridCovariance(const Geometry_ &, const Variables &, const eckit::Configuration &, const State_ &, const State_ &)
Constructor, destructor.
Generic hybrid static-ensemble model space error covariance.