MPAS-JEDI
ModelMPAS.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 MPASJEDI_MODELMPAS_H_
9 #define MPASJEDI_MODELMPAS_H_
10 
11 #include <ostream>
12 #include <string>
13 
14 #include "oops/interface/ModelBase.h"
15 #include "oops/util/Duration.h"
16 #include "oops/util/ObjectCounter.h"
17 
18 #include "mpasjedi/GeometryMPAS.h"
19 #include "mpasjedi/MPASTraits.h"
20 
21 // Forward declarations
22 namespace eckit {
23  class Configuration;
24 }
25 
26 namespace oops {
27  class Variables;
28 }
29 
30 namespace mpas {
31  class ModelBiasMPAS;
32  class StateMPAS;
33 
34 // -----------------------------------------------------------------------------
35 /// MPAS model definition.
36 /*!
37  * MPAS nonlinear model definition and configuration parameters.
38  */
39 
40 class ModelMPAS: public oops::interface::ModelBase<MPASTraits>,
41  private util::ObjectCounter<ModelMPAS> {
42  public:
43  static const std::string classname() {return "mpas::ModelMPAS";}
44 
45  ModelMPAS(const GeometryMPAS &, const eckit::Configuration &);
46  ~ModelMPAS();
47 
48 /// Prepare model integration
49  void initialize(StateMPAS &) const;
50 
51 /// Model integration
52  void step(StateMPAS &, const ModelBiasMPAS &) const;
53  int saveTrajectory(StateMPAS &, const ModelBiasMPAS &) const;
54 
55 /// Finish model integration
56  void finalize(StateMPAS &) const;
57 
58 /// Utilities
59  const util::Duration & timeResolution() const {return tstep_;}
60  const oops::Variables & variables() const {return vars_;}
61 
62  private:
63  void print(std::ostream &) const;
65  util::Duration tstep_;
67  const oops::Variables vars_;
68 };
69 // -----------------------------------------------------------------------------
70 
71 } // namespace mpas
72 #endif // MPASJEDI_MODELMPAS_H_
GeometryMPAS handles geometry for MPAS model.
Definition: GeometryMPAS.h:37
Model error for the MPAS model.
Definition: ModelBiasMPAS.h:38
MPAS model definition.
Definition: ModelMPAS.h:41
int saveTrajectory(StateMPAS &, const ModelBiasMPAS &) const
Definition: ModelMPAS.cc:59
F90model keyModel_
Definition: ModelMPAS.h:64
void finalize(StateMPAS &) const
Finish model integration.
Definition: ModelMPAS.cc:55
const oops::Variables & variables() const
Definition: ModelMPAS.h:60
ModelMPAS(const GeometryMPAS &, const eckit::Configuration &)
Definition: ModelMPAS.cc:26
const oops::Variables vars_
Definition: ModelMPAS.h:67
const GeometryMPAS geom_
Definition: ModelMPAS.h:66
static const std::string classname()
Definition: ModelMPAS.h:43
const util::Duration & timeResolution() const
Utilities.
Definition: ModelMPAS.h:59
void initialize(StateMPAS &) const
Prepare model integration.
Definition: ModelMPAS.cc:43
util::Duration tstep_
Definition: ModelMPAS.h:65
void step(StateMPAS &, const ModelBiasMPAS &) const
Model integration.
Definition: ModelMPAS.cc:48
void print(std::ostream &) const
Definition: ModelMPAS.cc:68
MPAS model state.
Definition: StateMPAS.h:51
Definition: Fortran.h:17
int F90model
Definition: Fortran.h:34