FV3 Bundle
ModelFV3JEDI.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_MODELFV3JEDI_H_
9 #define SRC_MODEL_MODELFV3JEDI_H_
10 
11 #include <ostream>
12 #include <string>
13 
14 #include <boost/noncopyable.hpp>
15 #include <boost/scoped_ptr.hpp>
16 
17 #include "oops/base/ModelBase.h"
18 #include "oops/base/Variables.h"
19 #include "oops/util/Duration.h"
20 #include "oops/util/ObjectCounter.h"
21 #include "oops/util/Printable.h"
22 
23 #include "FV3JEDITraits.h"
24 #include "ModelFV3JEDIFortran.h"
25 #include "GeometryFV3JEDI.h"
26 
27 // Forward declarations
28 namespace eckit {
29  class Configuration;
30 }
31 
32 namespace fv3jedi {
33  class ModelBiasFV3JEDI;
34  class IncrementFV3JEDI;
35  class StateFV3JEDI;
36 
37 // -----------------------------------------------------------------------------
38 /// FV3JEDI model definition.
39 /*!
40  * FV3JEDI nonlinear model definition and configuration parameters.
41  */
42 
43 class ModelFV3JEDI: public oops::ModelBase<FV3JEDITraits>,
44  private util::ObjectCounter<ModelFV3JEDI> {
45  public:
46  static const std::string classname() {return "fv3jedi::ModelFV3JEDI";}
47 
48  ModelFV3JEDI(const GeometryFV3JEDI &, const eckit::Configuration &);
49  ~ModelFV3JEDI();
50 
51 /// Prepare model integration
52  void initialize(StateFV3JEDI &) const;
53 
54 /// Model integration
55  void step(StateFV3JEDI &, const ModelBiasFV3JEDI &) const;
56  int saveTrajectory(StateFV3JEDI &, const ModelBiasFV3JEDI &) const;
57 
58 /// Finish model integration
59  void finalize(StateFV3JEDI &) const;
60 
61 /// Utilities
62  const util::Duration & timeResolution() const {return tstep_;}
63  const oops::Variables & variables() const {return vars_;}
64 
65  private:
66  void print(std::ostream &) const;
68  util::Duration tstep_;
71 };
72 // -----------------------------------------------------------------------------
73 
74 } // namespace fv3jedi
75 #endif // SRC_MODEL_MODELFV3JEDI_H_
void step(StateFV3JEDI &, const ModelBiasFV3JEDI &) const
Model integration.
Definition: ModelFV3JEDI.cc:51
const util::Duration & timeResolution() const
Utilities.
Definition: ModelFV3JEDI.h:62
void finalize(StateFV3JEDI &) const
Finish model integration.
Definition: ModelFV3JEDI.cc:58
void print(std::ostream &) const
Definition: ModelFV3JEDI.cc:71
Model error for the FV3JEDI model.
void initialize(StateFV3JEDI &) const
Prepare model integration.
Definition: ModelFV3JEDI.cc:46
util::Duration tstep_
Definition: ModelFV3JEDI.h:68
ModelFV3JEDI(const GeometryFV3JEDI &, const eckit::Configuration &)
Definition: ModelFV3JEDI.cc:26
FV3JEDI model definition.
Definition: ModelFV3JEDI.h:43
const oops::Variables vars_
Definition: ModelFV3JEDI.h:70
int saveTrajectory(StateFV3JEDI &, const ModelBiasFV3JEDI &) const
Definition: ModelFV3JEDI.cc:63
GeometryFV3JEDI handles geometry for FV3JEDI model.
const GeometryFV3JEDI geom_
Definition: ModelFV3JEDI.h:69
Base class for encapsulation of the forecast model.
Definition: ModelBase.h:40
static const std::string classname()
Definition: ModelFV3JEDI.h:46
const oops::Variables & variables() const
Definition: ModelFV3JEDI.h:63