11 #ifndef OOPS_BASE_OBSERRORS_H_ 12 #define OOPS_BASE_OBSERRORS_H_ 17 #include <boost/noncopyable.hpp> 18 #include <boost/shared_ptr.hpp> 20 #include "eckit/config/LocalConfiguration.h" 26 #include "oops/util/Logger.h" 27 #include "oops/util/Printable.h" 33 template <
typename MODEL>
35 private boost::noncopyable {
43 static const std::string
classname() {
return "oops::ObsErrors";}
63 void print(std::ostream &)
const;
64 std::vector<boost::shared_ptr<ObsError_> >
err_;
69 template <
typename MODEL>
72 for (std::size_t jj = 0; jj < os.
size(); ++jj) {
73 eckit::LocalConfiguration
conf(os[jj].config(),
"Covariance");
81 template <
typename MODEL>
86 template <
typename MODEL>
88 for (std::size_t jj = 0; jj < err_.size(); ++jj) {
89 err_[jj]->linearize(yy[jj]);
95 template <
typename MODEL>
97 std::vector<boost::shared_ptr<ObsVector_> > ovec;
98 for (std::size_t jj = 0; jj < err_.size(); ++jj) {
99 boost::shared_ptr<ObsVector_>
tmp(err_[jj]->
multiply(dy[jj]));
107 template <
typename MODEL>
109 std::vector<boost::shared_ptr<ObsVector_> > ovec;
110 for (std::size_t jj = 0; jj < err_.size(); ++jj) {
111 boost::shared_ptr<ObsVector_>
tmp(err_[jj]->inverseMultiply(dy[jj]));
119 template <
typename MODEL>
121 for (std::size_t jj = 0; jj < err_.size(); ++jj) {
122 err_[jj]->randomize(dy[jj]);
128 template<
typename MODEL>
130 for (std::size_t jj = 0; jj < err_.size(); ++jj) os << *err_[jj];
137 #endif // OOPS_BASE_OBSERRORS_H_ void linearize(const Observations_ &)
Linearize and reset for inner loop if needed.
ObsVector< MODEL > ObsVector_
ObsErrorCovariance< MODEL > ObsError_
void print(std::ostream &) const
Difference between two observation vectors.
ObsSpaces< MODEL > ObsSpace_
Observations< MODEL > Observations_
Departures< MODEL > Departures_
The namespace for the main oops code.
const ObsError_ & operator[](const std::size_t ii) const
subroutine, public multiply(self, geom, xctl, xmod)
std::vector< boost::shared_ptr< ObsError_ > > err_
static const std::string classname()
void randomize(Departures_ &) const
Generate random perturbation.
std::size_t size() const
Access.
ObsErrors(const ObsSpace_ &)
Observation error covariance matrix.
Departures_ * inverseMultiply(const Departures_ &) const
std::size_t size() const
Access.
Departures_ * multiply(const Departures_ &) const
Multiply a Departure by and .