FV3 Bundle
TlmIdFV3JEDI.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017 UCAR
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  */
7 
8 #ifndef SRC_MODEL_TLMIDFV3JEDI_H_
9 #define SRC_MODEL_TLMIDFV3JEDI_H_
10 
11 #include <string>
12 
13 #include <boost/noncopyable.hpp>
14 
16 #include "oops/util/Duration.h"
17 #include "oops/util/ObjectCounter.h"
18 #include "oops/util/Printable.h"
19 
20 #include "FV3JEDITraits.h"
21 #include "TlmFV3JEDIFortran.h"
22 
23 // Forward declarations
24 namespace eckit {
25  class Configuration;
26 }
27 
28 namespace fv3jedi {
29 
30 // -----------------------------------------------------------------------------
31 /// FV3JEDI linear identity model definition.
32 /*!
33  * FV3JEDI linear identity model definition and configuration parameters.
34  */
35 
36 class TlmIdFV3JEDI: public oops::LinearModelBase<FV3JEDITraits>,
37  private util::ObjectCounter<TlmIdFV3JEDI> {
38  public:
39  static const std::string classname() {return "fv3jedi::TlmIdFV3JEDI";}
40 
41  TlmIdFV3JEDI(const GeometryFV3JEDI &, const eckit::Configuration &);
42  ~TlmIdFV3JEDI();
43 
44 /// Model trajectory computation
45  void setTrajectory(const StateFV3JEDI &, StateFV3JEDI &,
46  const ModelBiasFV3JEDI &) override;
47 
48 /// Run TLM and its adjoint
49  void initializeTL(IncrementFV3JEDI &) const override;
51  const override;
52  void finalizeTL(IncrementFV3JEDI &) const override;
53 
54  void initializeAD(IncrementFV3JEDI &) const override;
56  const override;
57  void finalizeAD(IncrementFV3JEDI &) const override;
58 
59 /// Other utilities
60  const util::Duration & timeResolution() const override {return tstep_;}
61  const GeometryFV3JEDI & 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 fv3jedi
76 #endif // SRC_MODEL_TLMIDFV3JEDI_H_
TlmIdFV3JEDI(const GeometryFV3JEDI &, const eckit::Configuration &)
Definition: TlmIdFV3JEDI.cc:29
const GeometryFV3JEDI & resolution() const
Definition: TlmIdFV3JEDI.h:61
const oops::Variables linvars_
Definition: TlmIdFV3JEDI.h:71
void finalizeTL(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:62
void initializeTL(IncrementFV3JEDI &) const override
Run TLM and its adjoint.
Definition: TlmIdFV3JEDI.cc:53
Model error for the FV3JEDI model.
void finalizeAD(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:75
const GeometryFV3JEDI resol_
Definition: TlmIdFV3JEDI.h:70
FV3JEDI linear identity model definition.
Definition: TlmIdFV3JEDI.h:36
void setTrajectory(const StateFV3JEDI &, StateFV3JEDI &, const ModelBiasFV3JEDI &) override
Model trajectory computation.
Definition: TlmIdFV3JEDI.cc:50
Base class for encapsulation of the linear forecast model.
void initializeAD(IncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:66
void stepAD(IncrementFV3JEDI &, ModelBiasIncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:70
const util::Duration & timeResolution() const override
Other utilities.
Definition: TlmIdFV3JEDI.h:60
util::Duration tstep_
Definition: TlmIdFV3JEDI.h:69
void print(std::ostream &) const override
Definition: TlmIdFV3JEDI.cc:79
GeometryFV3JEDI handles geometry for FV3JEDI model.
static const std::string classname()
Definition: TlmIdFV3JEDI.h:39
const oops::Variables & variables() const override
Definition: TlmIdFV3JEDI.h:62
void stepTL(IncrementFV3JEDI &, const ModelBiasIncrementFV3JEDI &) const override
Definition: TlmIdFV3JEDI.cc:57