FV3 Bundle
TlmIdQG.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_TLMIDQG_H_
12 #define QG_MODEL_TLMIDQG_H_
13 
14 #include <string>
15 
16 #include <boost/noncopyable.hpp>
17 
19 
20 #include "oops/base/Variables.h"
21 #include "oops/util/Duration.h"
22 #include "oops/util/ObjectCounter.h"
23 #include "oops/util/Printable.h"
24 
25 #include "model/QgTraits.h"
26 
27 // Forward declarations
28 namespace eckit {
29  class Configuration;
30 }
31 
32 namespace qg {
33 // -----------------------------------------------------------------------------
34 /// QG linear identity model definition.
35 /*!
36  * QG linear identity model definition and configuration parameters.
37  */
38 
39 class TlmIdQG: public oops::LinearModelBase<QgTraits>,
40  private util::ObjectCounter<TlmIdQG> {
41  public:
42  static const std::string classname() {return "qg::TlmIdQG";}
43 
44  TlmIdQG(const GeometryQG &, const eckit::Configuration &);
45  ~TlmIdQG();
46 
47 /// Model trajectory computation
48  void setTrajectory(const StateQG &, StateQG &, const ModelBias &) override;
49 
50 /// Run TLM and its adjoint
51  void initializeTL(IncrementQG &) const override;
52  void stepTL(IncrementQG &, const ModelBiasIncrement &) const override;
53  void finalizeTL(IncrementQG &) const override;
54 
55  void initializeAD(IncrementQG &) const override;
56  void stepAD(IncrementQG &, ModelBiasIncrement &) const override;
57  void finalizeAD(IncrementQG &) const override;
58 
59 /// Other utilities
60  const util::Duration & timeResolution() const override {return tstep_;}
61  const GeometryQG & resolution() const {return resol_;}
62  const oops::Variables & variables() const override {return linvars_;}
63 
64  private:
65  void print(std::ostream &) const override;
66 
67 // Data
69  util::Duration tstep_;
72 };
73 // -----------------------------------------------------------------------------
74 
75 } // namespace qg
76 #endif // QG_MODEL_TLMIDQG_H_
void finalizeAD(IncrementQG &) const override
Definition: TlmIdQG.cc:72
Model error for the QG model.
const GeometryQG resol_
Definition: TlmIdQG.h:70
void stepTL(IncrementQG &, const ModelBiasIncrement &) const override
Definition: TlmIdQG.cc:55
const util::Duration & timeResolution() const override
Other utilities.
Definition: TlmIdQG.h:60
int keyConfig_
Definition: TlmIdQG.h:68
util::Duration tstep_
Definition: TlmIdQG.h:69
const oops::Variables & variables() const override
Definition: TlmIdQG.h:62
void print(std::ostream &) const override
Definition: TlmIdQG.cc:77
void setTrajectory(const StateQG &, StateQG &, const ModelBias &) override
Model trajectory computation.
Definition: TlmIdQG.cc:47
void initializeAD(IncrementQG &) const override
Definition: TlmIdQG.cc:63
QG linear identity model definition.
Definition: TlmIdQG.h:39
void initializeTL(IncrementQG &) const override
Run TLM and its adjoint.
Definition: TlmIdQG.cc:49
TlmIdQG(const GeometryQG &, const eckit::Configuration &)
Definition: TlmIdQG.cc:30
Base class for encapsulation of the linear forecast model.
QG model state.
Definition: StateQG.h:50
void stepAD(IncrementQG &, ModelBiasIncrement &) const override
Definition: TlmIdQG.cc:68
const GeometryQG & resolution() const
Definition: TlmIdQG.h:61
GeometryQG handles geometry for QG model.
Definition: GeometryQG.h:33
const oops::Variables linvars_
Definition: TlmIdQG.h:71
void finalizeTL(IncrementQG &) const override
Definition: TlmIdQG.cc:59
The namespace for the qg model.
static const std::string classname()
Definition: TlmIdQG.h:42
Increment Class: Difference between two states.
Definition: IncrementQG.h:55