FV3-JEDI
ModelPseudo.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2019 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 FV3JEDI_MODEL_PSEUDO_MODELPSEUDO_H_
9 #define FV3JEDI_MODEL_PSEUDO_MODELPSEUDO_H_
10 
11 #include <ostream>
12 #include <string>
13 
14 #include "oops/base/ModelBase.h"
15 #include "oops/base/Variables.h"
16 #include "oops/util/Duration.h"
17 #include "oops/util/ObjectCounter.h"
18 #include "oops/util/Printable.h"
19 
23 
24 // Forward declarations
25 namespace eckit {
26  class Configuration;
27 }
28 
29 namespace fv3jedi {
30  class ModelBias;
31  class Increment;
32  class State;
33 
34 // -----------------------------------------------------------------------------
35 /// FV3JEDI model definition.
36 /*!
37  * FV3JEDI nonlinear model definition and configuration parameters.
38  */
39 
40 class ModelPseudo: public oops::ModelBase<Traits>,
41  private util::ObjectCounter<ModelPseudo> {
42  public:
43  static const std::string classname() {return "fv3jedi::ModelPseudo";}
44 
45  ModelPseudo(const Geometry &, const eckit::Configuration &);
46  ~ModelPseudo();
47 
48 /// Prepare model integration
49  void initialize(State &) const;
50 
51 /// Model integration
52  void step(State &, const ModelBias &) const;
53 
54 /// Finish model integration
55  void finalize(State &) const;
56 
57 /// Utilities
58  const util::Duration & timeResolution() const {return tstep_;}
59  const oops::Variables & variables() const {return vars_;}
60 
61  private:
62  void print(std::ostream &) const;
64  util::Duration tstep_;
65  const Geometry geom_;
66  const oops::Variables vars_;
67  int runstagecheck_ = 0;
68  mutable bool runstage_ = true;
69 };
70 // -----------------------------------------------------------------------------
71 
72 } // namespace fv3jedi
73 #endif // FV3JEDI_MODEL_PSEUDO_MODELPSEUDO_H_
Traits.h
fv3jedi::ModelPseudo::classname
static const std::string classname()
Definition: ModelPseudo.h:43
fv3jedi::ModelPseudo::runstagecheck_
int runstagecheck_
Definition: ModelPseudo.h:67
fv3jedi::ModelPseudo::initialize
void initialize(State &) const
Prepare model integration.
Definition: ModelPseudo.cc:45
fv3jedi::ModelPseudo::~ModelPseudo
~ModelPseudo()
Definition: ModelPseudo.cc:40
fv3jedi::ModelPseudo::finalize
void finalize(State &) const
Finish model integration.
Definition: ModelPseudo.cc:68
fv3jedi::ModelPseudo::runstage_
bool runstage_
Definition: ModelPseudo.h:68
fv3jedi::ModelPseudo::variables
const oops::Variables & variables() const
Definition: ModelPseudo.h:59
fv3jedi::ModelPseudo::tstep_
util::Duration tstep_
Definition: ModelPseudo.h:64
fv3jedi::F90model
int F90model
Definition: interface.h:28
Geometry.h
fv3jedi::ModelPseudo::step
void step(State &, const ModelBias &) const
Model integration.
Definition: ModelPseudo.cc:52
fv3jedi::ModelBias
Model error for the FV3JEDI model.
Definition: ModelBias.h:41
fv3jedi::ModelPseudo
FV3JEDI model definition.
Definition: ModelPseudo.h:41
eckit
Definition: FieldsMetadata.h:25
fv3jedi::ModelPseudo::vars_
const oops::Variables vars_
Definition: ModelPseudo.h:66
fv3jedi::ModelPseudo::keyConfig_
F90model keyConfig_
Definition: ModelPseudo.h:63
fv3jedi::Geometry
Geometry handles geometry for FV3JEDI model.
Definition: Geometry.h:41
fv3jedi::ModelPseudo::print
void print(std::ostream &) const
Definition: ModelPseudo.cc:76
fv3jedi::ModelPseudo::ModelPseudo
ModelPseudo(const Geometry &, const eckit::Configuration &)
Definition: ModelPseudo.cc:27
fv3jedi::State
Definition: State.h:45
fv3jedi
Configuration files should be formatted as e.g.
Definition: ErrorCovariance.cc:20
fv3jedi::ModelPseudo::timeResolution
const util::Duration & timeResolution() const
Utilities.
Definition: ModelPseudo.h:58
fv3jedi::ModelPseudo::geom_
const Geometry geom_
Definition: ModelPseudo.h:65
ModelPseudo.interface.h