FV3 Bundle
Resolution.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_RESOLUTION_H_
12 #define LORENZ95_RESOLUTION_H_
13 
14 #include <iostream>
15 #include <vector>
16 
17 #include "eckit/config/Configuration.h"
18 #include "oops/util/Printable.h"
19 
20 namespace lorenz95 {
21 
22 // -----------------------------------------------------------------------------
23 /// Handles resolution.
24 
25 class Resolution : public util::Printable {
26  public:
27  explicit Resolution(const eckit::Configuration & conf): resol_(conf.getInt("resol")) {}
28  explicit Resolution(const int resol): resol_(resol) {}
29  Resolution(const Resolution & other): resol_(other.resol_) {}
31 
32  std::vector<double> getLats() const;
33  std::vector<double> getLons() const;
34  std::vector<double> getLevs() const;
35  std::vector<int> getMask(const int &) const;
36 
37  int npoints() const {return resol_;}
38 
39  private:
40  Resolution & operator=(const Resolution &);
41  void print(std::ostream & os) const {os << resol_;}
42  const int resol_;
43 };
44 
45 // -----------------------------------------------------------------------------
46 
47 } // namespace lorenz95
48 
49 #endif // LORENZ95_RESOLUTION_H_
Resolution(const Resolution &other)
Definition: Resolution.h:29
Resolution(const int resol)
Definition: Resolution.h:28
std::vector< double > getLats() const
Definition: conf.py:1
Resolution & operator=(const Resolution &)
std::vector< double > getLevs() const
void print(std::ostream &os) const
Definition: Resolution.h:41
Handles resolution.
Definition: Resolution.h:25
Resolution(const eckit::Configuration &conf)
Definition: Resolution.h:27
std::vector< int > getMask(const int &) const
int npoints() const
Definition: Resolution.h:37
The namespace for the L95 model.
std::vector< double > getLons() const