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