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 <array>
15 #include <ostream>
16 #include <string>
17 #include <boost/noncopyable.hpp>
18 
19 #include "model/ObsBias.h"
21 #include "oops/util/ObjectCounter.h"
22 #include "oops/util/parameters/GenericParameters.h"
23 #include "oops/util/Printable.h"
24 
25 namespace qg {
26  class ObsBias;
27  class ObsBiasIncrement;
28  class ObsSpaceQG;
29 
30 // -----------------------------------------------------------------------------
31 
32 class ObsBiasCovariance : public util::Printable,
33  private boost::noncopyable,
34  private util::ObjectCounter<ObsBiasCovariance> {
35  public:
37 
38  static const std::string classname() {return "qg::ObsBiasCovariance";}
39 
40 /// Constructor, destructor
41  ObsBiasCovariance(const ObsSpaceQG &, const Parameters_ &);
43 
44 /// Linear algebra operators
45  void linearize(const ObsBias &, const eckit::Configuration &) {}
46  void multiply(const ObsBiasIncrement &, ObsBiasIncrement &) const;
47  void inverseMultiply(const ObsBiasIncrement &, ObsBiasIncrement &) const;
48  void randomize(ObsBiasIncrement &) const;
49 
50  bool active(const unsigned int ii) const {return variance_[ii] > 0.0;}
51 
52  private:
53  void print(std::ostream &) const;
54  std::array<double, ObsBias::ntypes> variance_;
55 };
56 
57 // -----------------------------------------------------------------------------
58 
59 } // namespace qg
60 
61 #endif // QG_MODEL_OBSBIASCOVARIANCE_H_
std::array< double, ObsBias::ntypes > variance_
ObsBiasCovariance(const ObsSpaceQG &, const Parameters_ &)
Constructor, destructor.
static const std::string classname()
void multiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
void linearize(const ObsBias &, const eckit::Configuration &)
Linear algebra operators.
void print(std::ostream &) const
void randomize(ObsBiasIncrement &) const
bool active(const unsigned int ii) const
void inverseMultiply(const ObsBiasIncrement &, ObsBiasIncrement &) const
Class to handle observation bias parameters.
ObsSpace for QG model.
Definition: ObsSpaceQG.h:81
The namespace for the qg model.