FV3 Bundle
oops/qg/model/ObsBiasCovariance.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef QG_MODEL_OBSBIASCOVARIANCE_H_
12 #define QG_MODEL_OBSBIASCOVARIANCE_H_
13 
14 #include <ostream>
15 #include <string>
16 #include <vector>
17 #include <boost/noncopyable.hpp>
18 
19 #include "eckit/config/LocalConfiguration.h"
20 #include "oops/util/ObjectCounter.h"
21 #include "oops/util/Printable.h"
22 
23 namespace qg {
24  class ObsBias;
25  class ObsBiasIncrement;
26 
27 // -----------------------------------------------------------------------------
28 
29 class ObsBiasCovariance : public util::Printable,
30  private boost::noncopyable,
31  private util::ObjectCounter<ObsBiasCovariance> {
32  public:
33  static const std::string classname() {return "qg::ObsBiasCovariance";}
34 
35 /// Constructor, destructor
36  explicit ObsBiasCovariance(const eckit::Configuration &);
38 
39 /// Linear algebra operators
40  void linearize(const ObsBias &) {}
41  void multiply(const ObsBiasIncrement &, ObsBiasIncrement &) const;
42  void inverseMultiply(const ObsBiasIncrement &, ObsBiasIncrement &) const;
43  void randomize(ObsBiasIncrement &) const;
44 
45  const eckit::Configuration & config() const {return conf_;}
46  bool active(const unsigned int ii) const {return variance_[ii] > 0.0;}
47 
48  private:
49  void print(std::ostream &) const;
50  const eckit::LocalConfiguration conf_;
51  std::vector<double> variance_;
52 };
53 
54 // -----------------------------------------------------------------------------
55 
56 } // namespace qg
57 
58 #endif // QG_MODEL_OBSBIASCOVARIANCE_H_
static const std::string classname()
void print(std::ostream &) const
void multiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
void randomize(ObsBiasIncrement &) const
Class to handle observation bias parameters.
ObsBiasCovariance(const eckit::Configuration &)
Constructor, destructor.
void inverseMultiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
const eckit::LocalConfiguration conf_
void linearize(const ObsBias &)
Linear algebra operators.
const eckit::Configuration & config() const
bool active(const unsigned int ii) const
The namespace for the qg model.