FV3 Bundle
src/lorenz95/Resolution.cc
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 #include "lorenz95/Resolution.h"
12 #include <vector>
13 
14 // -----------------------------------------------------------------------------
15 namespace lorenz95 {
16 // -----------------------------------------------------------------------------
17 std::vector<double> Resolution::getLats() const {
18  std::vector<double> lats(resol_);
19  for (int jj = 0; jj < resol_; ++jj) lats[jj] = 0.0;
20  return lats;
21 }
22 // -----------------------------------------------------------------------------
23 std::vector<double> Resolution::getLons() const {
24  std::vector<double> lons(resol_);
25  double dx = 360.0 / resol_;
26  for (int jj = 0; jj < resol_; ++jj) lons[jj] = dx * jj;
27  return lons;
28 }
29 // -----------------------------------------------------------------------------
30 std::vector<double> Resolution::getLevs() const {
31  std::vector<double> levs(1);
32  levs[0] = 0.0;
33  return levs;
34 }
35 // -----------------------------------------------------------------------------
36 std::vector<int> Resolution::getMask(const int &) const {
37  std::vector<int> mask(resol_);
38  for (int jj = 0; jj < resol_; ++jj) mask[jj] = 1;
39  return mask;
40 }
41 // -----------------------------------------------------------------------------
42 
43 } // namespace lorenz95
std::vector< double > getLats() const
std::vector< double > getLevs() const
integer, dimension(nplev) levs
std::vector< int > getMask(const int &) const
The namespace for the L95 model.
std::vector< double > getLons() const