FV3 Bundle
l95/src/lorenz95/ModelBiasCovariance.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_MODELBIASCOVARIANCE_H_
12 #define LORENZ95_MODELBIASCOVARIANCE_H_
13 
14 #include <ostream>
15 #include <string>
16 #include <boost/noncopyable.hpp>
17 
18 #include "eckit/config/LocalConfiguration.h"
19 #include "oops/util/ObjectCounter.h"
20 #include "oops/util/Printable.h"
21 
22 namespace lorenz95 {
23  class ModelBias;
24  class ModelBiasCorrection;
25  class Resolution;
26 
27 // -----------------------------------------------------------------------------
28 
29 class ModelBiasCovariance : public util::Printable,
30  private boost::noncopyable,
31  private util::ObjectCounter<ModelBiasCovariance> {
32  public:
33  static const std::string classname() {return "lorenz95::ModelBiasCovariance";}
34 
35 /// Constructor, destructor
36  ModelBiasCovariance(const eckit::Configuration &, const Resolution &);
38 
39 /// Linear algebra operators
40  void linearize(const ModelBias &, const Resolution &) {}
41  void multiply(const ModelBiasCorrection &, ModelBiasCorrection &) const;
43  void randomize(ModelBiasCorrection &) const;
44 
45  const eckit::Configuration & config() const {return conf_;}
46  bool active() const {return active_;} // For tests only
47 
48  private:
49  void print(std::ostream &) const;
50  const eckit::LocalConfiguration conf_;
51  double variance_;
52  bool active_;
53 };
54 
55 // -----------------------------------------------------------------------------
56 
57 } // namespace lorenz95
58 
59 #endif // LORENZ95_MODELBIASCOVARIANCE_H_
ModelBiasCovariance(const eckit::Configuration &, const Resolution &)
Constructor, destructor.
void randomize(ModelBiasCorrection &) const
void inverseMultiply(const ModelBiasCorrection &, ModelBiasCorrection &) const
Handles resolution.
Definition: Resolution.h:25
const eckit::Configuration & config() const
The namespace for the L95 model.
Model error for Lorenz 95 model.
void linearize(const ModelBias &, const Resolution &)
Linear algebra operators.
void multiply(const ModelBiasCorrection &, ModelBiasCorrection &) const