FV3 Bundle
VariablesQG.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 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 QG_MODEL_VARIABLESQG_H_
9 #define QG_MODEL_VARIABLESQG_H_
10 
11 #include <ostream>
12 #include <string>
13 #include <vector>
14 
15 #include "oops/base/Variables.h"
16 #include "oops/util/ObjectCounter.h"
17 #include "oops/util/Printable.h"
18 
19 namespace eckit {
20  class Configuration;
21 }
22 
23 namespace oops {
24  class Variables;
25 }
26 
27 namespace qg {
28 
29 // -----------------------------------------------------------------------------
30 
31 class VariablesQG : public util::Printable,
32  private util::ObjectCounter<VariablesQG> {
33  public:
34  static const std::string classname() {return "qg::VariablesQG";}
35 
36  explicit VariablesQG(const oops::Variables &);
37  explicit VariablesQG(const eckit::Configuration &);
38 
39  ~VariablesQG();
40 
41  VariablesQG(const VariablesQG &);
42 
43  const int * toFortran() const {return &fvars_[0];}
44  const oops::Variables& toOopsVariables() const {return oopsvars_;}
45  private:
46  void print(std::ostream &) const;
47  void setF90(const std::vector<std::string>);
48  std::vector<int> fvars_;
50 };
51 
52 // -----------------------------------------------------------------------------
53 
54 } // namespace qg
55 
56 #endif // QG_MODEL_VARIABLESQG_H_
VariablesQG(const oops::Variables &)
Definition: VariablesQG.cc:20
static const std::string classname()
Definition: VariablesQG.h:34
void print(std::ostream &) const
Definition: VariablesQG.cc:71
The namespace for the main oops code.
const int * toFortran() const
Definition: VariablesQG.h:43
const oops::Variables & toOopsVariables() const
Definition: VariablesQG.h:44
const oops::Variables oopsvars_
Definition: VariablesQG.h:49
std::vector< int > fvars_
Definition: VariablesQG.h:48
void setF90(const std::vector< std::string >)
Definition: VariablesQG.cc:40
The namespace for the qg model.