FV3 Bundle
GomQG.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_GOMQG_H_
12 #define QG_MODEL_GOMQG_H_
13 
14 #include <ostream>
15 #include <string>
16 #include <vector>
17 
18 #include "model/QgFortran.h"
19 #include "oops/util/ObjectCounter.h"
20 #include "oops/util/Printable.h"
21 
22 namespace oops {
23  class Variables;
24 }
25 
26 namespace qg {
27  class LocationsQG;
28 
29 /// GomQG class to handle local model values for QG model.
30 
31 class GomQG : public util::Printable,
32  private util::ObjectCounter<GomQG> {
33  public:
34  static const std::string classname() {return "qg::GomQG";}
35 
36  GomQG(const LocationsQG &, const oops::Variables &);
37  GomQG(const eckit::Configuration &, const oops::Variables &);
38  explicit GomQG(const GomQG &);
39 
40  GomQG(): keyGom_(0) {}
41  explicit GomQG(int & fgom): keyGom_(fgom) {}
42 
43  ~GomQG();
44 
45  void abs();
46  void zero();
47  void random();
48  double norm() const;
49  GomQG & operator=(const GomQG &);
50  GomQG & operator*=(const double &);
51  GomQG & operator+=(const GomQG &);
52  GomQG & operator-=(const GomQG &);
53  GomQG & operator/=(const GomQG &);
54  double dot_product_with(const GomQG &) const;
55  void read(const eckit::Configuration &);
56  void analytic_init(const LocationsQG &, const eckit::Configuration &);
57  void write(const eckit::Configuration &) const;
58 
59  int & toFortran() {return keyGom_;}
60  const int & toFortran() const {return keyGom_;}
61 
62  private:
63  void print(std::ostream &) const;
65 };
66 
67 } // namespace qg
68 
69 #endif // QG_MODEL_GOMQG_H_
void zero()
Definition: GomQG.cc:61
GomQG(int &fgom)
Definition: GomQG.h:41
GomQG class to handle local model values for QG model.
Definition: GomQG.h:31
static const std::string classname()
Definition: GomQG.h:34
void abs()
Definition: GomQG.cc:51
void random()
Definition: GomQG.cc:65
double dot_product_with(const GomQG &) const
Definition: GomQG.cc:95
GomQG()
Definition: GomQG.h:40
F90goms keyGom_
Definition: GomQG.h:64
The namespace for the main oops code.
void read(const eckit::Configuration &)
Definition: GomQG.cc:101
void print(std::ostream &) const
Definition: GomQG.cc:125
void analytic_init(const LocationsQG &, const eckit::Configuration &)
GomQG Analytic Initialization.
Definition: GomQG.cc:117
GomQG & operator/=(const GomQG &)
Definition: GomQG.cc:90
GomQG & operator=(const GomQG &)
Definition: GomQG.cc:69
~GomQG()
Definition: GomQG.cc:47
double norm() const
Definition: GomQG.cc:55
GomQG & operator+=(const GomQG &)
Definition: GomQG.cc:80
LocationsQG class to handle locations for QG model.
Definition: LocationsQG.h:26
GomQG & operator-=(const GomQG &)
Definition: GomQG.cc:85
GomQG & operator*=(const double &)
Definition: GomQG.cc:75
void write(const eckit::Configuration &) const
Definition: GomQG.cc:106
int & toFortran()
Definition: GomQG.h:59
int F90goms
Definition: QgFortran.h:36
The namespace for the qg model.
const int & toFortran() const
Definition: GomQG.h:60