FV3 Bundle
oops/qg/model/ObsBias.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_OBSBIAS_H_
12 #define QG_MODEL_OBSBIAS_H_
13 
14 #include <iostream>
15 #include <string>
16 #include <vector>
17 #include <boost/noncopyable.hpp>
18 
19 #include "oops/util/ObjectCounter.h"
20 #include "oops/util/Printable.h"
21 
22 namespace eckit {
23  class Configuration;
24 }
25 
26 namespace qg {
27  class ObsBiasIncrement;
28 
29 /// Class to handle observation bias parameters.
30 
31 // -----------------------------------------------------------------------------
32 
33 class ObsBias : public util::Printable,
34  private boost::noncopyable,
35  private util::ObjectCounter<ObsBias> {
36  public:
37  static const unsigned int ntypes = 4;
38  static const std::string classname() {return "qg::ObsBias";}
39 
40  explicit ObsBias(const eckit::Configuration &);
41  ObsBias(const ObsBias &, const bool);
42  ~ObsBias() {}
43 
45 
46 /// I/O and diagnostics
47  void read(const eckit::Configuration &) {}
48  void write(const eckit::Configuration &) const {}
49  double norm() const;
50 
51  const double & operator[](const unsigned int ii) const {return bias_[ii];}
52 
53  const double & stream() const {return bias_[0];}
54  const double & wind() const {return bias_[1];}
55  const double & wspd() const {return bias_[3];}
56 
57  private:
58  void print(std::ostream &) const;
59  std::vector<double> bias_;
60  bool active_;
61 };
62 
63 // -----------------------------------------------------------------------------
64 
65 } // namespace qg
66 
67 #endif // QG_MODEL_OBSBIAS_H_
static const std::string classname()
std::vector< double > bias_
ObsBias & operator+=(const ObsBiasIncrement &)
double norm() const
const double & stream() const
const double & wind() const
void print(std::ostream &) const
Class to handle observation bias parameters.
static const unsigned int ntypes
ObsBias(const eckit::Configuration &)
void write(const eckit::Configuration &) const
void read(const eckit::Configuration &)
I/O and diagnostics.
const double & wspd() const
The namespace for the qg model.
const double & operator[](const unsigned int ii) const