MI - Fimex
HybridSigmaPressure1.h
Go to the documentation of this file.
1 /*
2  * Fimex, HybridSigmaPressure1.h
3  *
4  * (C) Copyright 2013, met.no
5  *
6  * Project Info: https://wiki.met.no/fimex/start
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21  * USA.
22  *
23  * Created on: Aug 6, 2013
24  * Author: heikok
25  */
26 
27 #ifndef HYBRIDSIGMAPRESSURE1_H_
28 #define HYBRIDSIGMAPRESSURE1_H_
29 
31 
32 
33 namespace MetNoFimex
34 {
38 class HybridSigmaPressure1 : public VerticalTransformation
40 {
41 public:
42  const std::string ap;
43  const std::string b;
44  const std::string ps;
45  const std::string p0;
55  HybridSigmaPressure1(const std::string& ap, const std::string& b, const std::string& ps, const std::string& p0 = "") : ap(ap), b(b), ps(ps), p0(p0) {}
56  virtual ~HybridSigmaPressure1() {}
61  static const std::string NAME() { return "atmosphere_hybrid_sigma_pressure_coordinate_1";}
65  virtual std::string getName() const { return NAME(); }
66  virtual int getPreferredVerticalType() const { return MIFI_VINT_PRESSURE; }
67  virtual std::string getParameterString() const { return "ap="+ap+",b="+b+",ps="+ps+",p0="+p0; }
68  virtual bool isComplete() const {return ap != "" && b != "" && ps != "";}
69 protected:
70  virtual boost::shared_ptr<ToVLevelConverter> getPressureConverter(const boost::shared_ptr<CDMReader>& reader, size_t unLimDimPos, boost::shared_ptr<const CoordinateSystem> cs, size_t nx, size_t ny, size_t nt) const;
71 };
72 
73 } /* namespace MetNoFimex */
74 #endif /* HYBRIDSIGMAPRESSURE1_H_ */
basic_string< char > string
const std::string p0
Definition: HybridSigmaPressure1.h:45
const std::string b
Definition: HybridSigmaPressure1.h:43
virtual boost::shared_ptr< ToVLevelConverter > getPressureConverter(const boost::shared_ptr< CDMReader > &reader, size_t unLimDimPos, boost::shared_ptr< const CoordinateSystem > cs, size_t nx, size_t ny, size_t nt) const
static const std::string NAME()
Definition: HybridSigmaPressure1.h:61
Definition: C_CDMReader.h:35
virtual std::string getName() const
Definition: HybridSigmaPressure1.h:65
HybridSigmaPressure1(const std::string &ap, const std::string &b, const std::string &ps, const std::string &p0="")
Definition: HybridSigmaPressure1.h:55
const std::string ps
Definition: HybridSigmaPressure1.h:44
virtual bool isComplete() const
Definition: HybridSigmaPressure1.h:68
virtual int getPreferredVerticalType() const
the most natural vertical type, one of the MIFI_VINT_* in fimex/mifi_constants.h
Definition: HybridSigmaPressure1.h:66
virtual ~HybridSigmaPressure1()
Definition: HybridSigmaPressure1.h:56
virtual std::string getParameterString() const
list the parameters
Definition: HybridSigmaPressure1.h:67
#define MIFI_VINT_PRESSURE
vertical interpolation type
Definition: mifi_constants.h:168
const std::string ap
Definition: HybridSigmaPressure1.h:42