FV3 Bundle
oops/l95/src/lorenz95/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 LORENZ95_OBSBIAS_H_
12 #define LORENZ95_OBSBIAS_H_
13 
14 #include <cmath>
15 #include <iostream>
16 #include <string>
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 lorenz95 {
27  class ObsBiasCorrection;
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 std::string classname() {return "lorenz95::ObsBias";}
38 
39  explicit ObsBias(const eckit::Configuration &);
40  ObsBias(const ObsBias &, const bool);
41  ~ObsBias() {}
42 
44 
45  const double & value() const {return bias_;}
46  double & value() {return bias_;}
47 
48 /// I/O and diagnostics
49  void read(const eckit::Configuration &) {}
50  void write(const eckit::Configuration &) const {}
51  double norm() const {return std::abs(bias_);}
52 
53  private:
54  void print(std::ostream &) const;
55  double bias_;
56  bool active_;
57 };
58 
59 // -----------------------------------------------------------------------------
60 
61 } // namespace lorenz95
62 
63 #endif // LORENZ95_OBSBIAS_H_
ObsBias & operator+=(const ObsBiasCorrection &)
void write(const eckit::Configuration &) const
Class to handle observation bias parameters.
static const std::string classname()
The namespace for the L95 model.
void read(const eckit::Configuration &)
I/O and diagnostics.
void print(std::ostream &) const
ObsBias(const eckit::Configuration &)
const double & value() const