11 #ifndef OOPS_INTERFACE_OBSERRORCOVARIANCE_H_ 12 #define OOPS_INTERFACE_OBSERRORCOVARIANCE_H_ 16 #include <boost/noncopyable.hpp> 17 #include <boost/scoped_ptr.hpp> 22 #include "oops/util/Printable.h" 43 template <
typename MODEL>
45 private util::ObjectCounter<ObsErrorCovariance<MODEL> >,
46 private boost::noncopyable {
52 static const std::string
classname() {
return "oops::ObsErrorCovariance";}
71 void print(std::ostream &)
const;
72 boost::scoped_ptr<ObsErrorBase_>
covar_;
77 template <
typename MODEL>
79 const eckit::Configuration &
conf)
82 Log::trace() <<
"ObsErrorCovariance<MODEL>::ObsErrorCovariance starting" << std::endl;
83 util::Timer timer(
classname(),
"ObsErrorCovariance");
85 Log::trace() <<
"ObsErrorCovariance<MODEL>::ObsErrorCovariance done" << std::endl;
90 template <
typename MODEL>
92 Log::trace() <<
"ObsErrorCovariance<MODEL>::~ObsErrorCovariance starting" << std::endl;
93 util::Timer timer(classname(),
"~ObsErrorCovariance");
95 Log::trace() <<
"ObsErrorCovariance<MODEL>::~ObsErrorCovariance done" << std::endl;
100 template <
typename MODEL>
102 Log::trace() <<
"ObsErrorCovariance<MODEL>::linearize starting" << std::endl;
103 util::Timer timer(classname(),
"linearize");
105 Log::trace() <<
"ObsErrorCovariance<MODEL>::linearize done" << std::endl;
110 template <
typename MODEL>
112 Log::trace() <<
"ObsErrorCovariance<MODEL>::multiply starting" << std::endl;
113 util::Timer timer(classname(),
"multiply");
115 Log::trace() <<
"ObsErrorCovariance<MODEL>::multiply done" << std::endl;
121 template <
typename MODEL>
123 Log::trace() <<
"ObsErrorCovariance<MODEL>::inverseMultiply starting" << std::endl;
124 util::Timer timer(classname(),
"inverseMultiply");
126 Log::trace() <<
"ObsErrorCovariance<MODEL>::inverseMultiply done" << std::endl;
132 template <
typename MODEL>
134 Log::trace() <<
"ObsErrorCovariance<MODEL>::randomize starting" << std::endl;
135 util::Timer timer(classname(),
"randomize");
137 Log::trace() <<
"ObsErrorCovariance<MODEL>::randomize done" << std::endl;
142 template <
typename MODEL>
144 Log::trace() <<
"ObsErrorCovariance<MODEL>::getRMSE starting" << std::endl;
145 util::Timer timer(classname(),
"getRMSE");
146 double zz = covar_->getRMSE();
147 Log::trace() <<
"ObsErrorCovariance<MODEL>::getRMSE done" << std::endl;
153 template<
typename MODEL>
155 Log::trace() <<
"ObsErrorCovariance<MODEL>::print starting" << std::endl;
156 util::Timer timer(classname(),
"print");
158 Log::trace() <<
"ObsErrorCovariance<MODEL>::print done" << std::endl;
165 #endif // OOPS_INTERFACE_OBSERRORCOVARIANCE_H_ void randomize(ObsVector_ &) const
Generate random perturbation.
void linearize(const ObsVector_ &)
Linearize and reset for inner loop if needed.
static const std::string classname()
The namespace for the main oops code.
void print(std::ostream &) const
ObsVector_ & obsvector()
Interfacing.
double getRMSE() const
Get mean error for Jo table.
ObsErrorBase< MODEL > ObsErrorBase_
ObsVector< MODEL > ObsVector_
ObsErrorCovariance(const ObsSpace_ &, const eckit::Configuration &)
boost::scoped_ptr< ObsErrorBase_ > covar_
Base class for observation error covariance matrices.
ObservationSpace< MODEL > ObsSpace_
Observation error covariance matrix.
ObsVector_ * inverseMultiply(const ObsVector_ &) const
ObsVector_ * multiply(const ObsVector_ &) const
Multiply a Departure by and .