FV3 Bundle
ErrorCovarianceL95.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_ERRORCOVARIANCEL95_H_
12 #define LORENZ95_ERRORCOVARIANCEL95_H_
13 
14 #include <unsupported/Eigen/FFT>
15 #include <ostream>
16 #include <string>
17 #include <vector>
18 
19 #include <boost/noncopyable.hpp>
20 
21 #include "eckit/config/Configuration.h"
22 #include "oops/util/DateTime.h"
23 #include "oops/util/ObjectCounter.h"
24 #include "oops/util/Printable.h"
25 
26 // Forward declarations
27 namespace oops {
28  class Variables;
29 }
30 
31 namespace lorenz95 {
32  class IncrementL95;
33  class StateL95;
34  class Resolution;
35 
36 /// Background error covariance matrix for Lorenz 95 model.
37 /*!
38  * Gaussian background error covariance matrix for Lorenz 95 model.
39  */
40 
41 // -----------------------------------------------------------------------------
42 class ErrorCovarianceL95 : public util::Printable,
43  private boost::noncopyable,
44  private util::ObjectCounter<ErrorCovarianceL95> {
45  public:
46  static const std::string classname() {return "lorenz95::ErrorCovarianceL95";}
47 
49  const eckit::Configuration &, const StateL95 &, const StateL95 &);
51 
52  void multiply(const IncrementL95 &, IncrementL95 &) const;
53  void inverseMultiply(const IncrementL95 &, IncrementL95 &) const;
54  void randomize(IncrementL95 &) const;
55 
56  private:
57  void print(std::ostream &) const;
58  const util::DateTime time_;
59  const double sigmab_;
60  const double rscale_;
61  unsigned int resol_;
62  unsigned int size_;
63  std::vector<double> bcoefs_;
64  mutable Eigen::FFT<double> fft_;
65 };
66 // -----------------------------------------------------------------------------
67 } // namespace lorenz95
68 
69 #endif // LORENZ95_ERRORCOVARIANCEL95_H_
Increment Class: Difference between two states.
Definition: IncrementL95.h:51
Handles resolution.
Definition: Resolution.h:25
The namespace for the main oops code.
Background error covariance matrix for Lorenz 95 model.
void inverseMultiply(const IncrementL95 &, IncrementL95 &) const
The namespace for the L95 model.
static const std::string classname()
void print(std::ostream &) const
L95 model state.
Definition: StateL95.h:50
void multiply(const IncrementL95 &, IncrementL95 &) const
ErrorCovarianceL95(const Resolution &, const oops::Variables &, const eckit::Configuration &, const StateL95 &, const StateL95 &)
std::vector< double > bcoefs_
void randomize(IncrementL95 &) const