FV3 Bundle
ModelL95.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 LORENZ95_MODELL95_H_
12 #define LORENZ95_MODELL95_H_
13 
14 #include <ostream>
15 #include <string>
16 
17 #include "eckit/config/Configuration.h"
18 #include "oops/base/ModelBase.h"
19 #include "oops/base/Variables.h"
20 #include "oops/util/DateTime.h"
21 #include "oops/util/Duration.h"
22 #include "oops/util/ObjectCounter.h"
23 #include "oops/util/Printable.h"
24 
25 #include "lorenz95/L95Traits.h"
26 #include "lorenz95/Resolution.h"
27 
28 namespace lorenz95 {
29  class FieldL95;
30  class ModelBias;
31  class ModelTrajectory;
32  class StateL95;
33 
34 /// Lorenz 95 model configuration and computations.
35 
36 // -----------------------------------------------------------------------------
37 
38 class ModelL95 : public oops::ModelBase<L95Traits>,
39  private util::ObjectCounter<ModelL95> {
40  public:
41  static const std::string classname() {return "lorenz95::ModelL95";}
42 
43  ModelL95(const Resolution &, const eckit::Configuration &);
44  ~ModelL95();
45 
46 // Run the forecast
47  void initialize(StateL95 &) const;
48  void step(StateL95 &, const ModelBias &) const;
49  void finalize(StateL95 &) const;
50  void stepRK(FieldL95 &, const ModelBias &, ModelTrajectory &) const;
51 
52 // Information and diagnostics
53  const util::Duration & timeResolution() const {return tstep_;}
54  const oops::Variables & variables() const {return vars_;}
55 
56  private:
57  void print(std::ostream &) const;
58  void tendencies(const FieldL95 &, const double &, FieldL95 &) const;
59 
60 // Data
62  const double f_;
63  const util::Duration tstep_;
64  const double dt_;
66 };
67 
68 // -----------------------------------------------------------------------------
69 
70 } // namespace lorenz95
71 
72 #endif // LORENZ95_MODELL95_H_
void stepRK(FieldL95 &, const ModelBias &, ModelTrajectory &) const
const util::Duration tstep_
Definition: ModelL95.h:63
ModelL95(const Resolution &, const eckit::Configuration &)
const double dt_
Definition: ModelL95.h:64
const double f_
Definition: ModelL95.h:62
const oops::Variables vars_
Definition: ModelL95.h:65
static const std::string classname()
Definition: ModelL95.h:41
void finalize(StateL95 &) const
void step(StateL95 &, const ModelBias &) const
Lorenz 95 model configuration and computations.
Definition: ModelL95.h:38
const util::Duration & timeResolution() const
Definition: ModelL95.h:53
Handles resolution.
Definition: Resolution.h:25
void print(std::ostream &) const
const Resolution resol_
Definition: ModelL95.h:61
void tendencies(const FieldL95 &, const double &, FieldL95 &) const
The namespace for the L95 model.
Model error for Lorenz 95 model.
L95 model trajectory.
L95 model state.
Definition: StateL95.h:50
Base class for encapsulation of the forecast model.
Definition: ModelBase.h:40
const oops::Variables & variables() const
Definition: ModelL95.h:54
void initialize(StateL95 &) const
Class to represent fields for the L95 model.
Definition: FieldL95.h:36