MI - Fimex
HybridSigmaPressure2.h
Go to the documentation of this file.
1 /*
2  * Fimex, HybridSigmaPressure2.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 HYBRIDSIGMAPRESSURE2_H_
28 #define HYBRIDSIGMAPRESSURE2_H_
29 
31 
32 namespace MetNoFimex
33 {
37 class HybridSigmaPressure2 : public VerticalTransformation
39 {
40 public:
41  const std::string a;
42  const std::string b;
43  const std::string ps;
44  const std::string p0;
54  HybridSigmaPressure2(const std::string& a, const std::string& b, const std::string& ps, const std::string& p0 = "") : a(a), b(b), ps(ps), p0(p0) {}
55  virtual ~HybridSigmaPressure2() {}
60  static const std::string NAME() {return "atmosphere_hybrid_sigma_pressure_coordinate_2";}
64  virtual std::string getName() const { return NAME(); }
65  virtual int getPreferredVerticalType() const { return MIFI_VINT_PRESSURE; }
66  virtual std::string getParameterString() const { return "a="+a+",b="+b+",ps="+ps+",p0="+p0; }
67  virtual bool isComplete() const {return a != "" && b != "" && ps != "" && p0 != "";}
68 protected:
69  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;
70 };
71 
72 } /* namespace MetNoFimex */
73 #endif /* HYBRIDSIGMAPRESSURE2_H_ */
virtual int getPreferredVerticalType() const
the most natural vertical type, one of the MIFI_VINT_* in fimex/mifi_constants.h
Definition: HybridSigmaPressure2.h:65
basic_string< char > string
static const std::string NAME()
Definition: HybridSigmaPressure2.h:60
virtual ~HybridSigmaPressure2()
Definition: HybridSigmaPressure2.h:55
const std::string ps
Definition: HybridSigmaPressure2.h:43
const std::string a
Definition: HybridSigmaPressure2.h:41
const std::string p0
Definition: HybridSigmaPressure2.h:44
virtual std::string getName() const
Definition: HybridSigmaPressure2.h:64
Definition: C_CDMReader.h:35
virtual bool isComplete() const
Definition: HybridSigmaPressure2.h:67
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
virtual std::string getParameterString() const
list the parameters
Definition: HybridSigmaPressure2.h:66
#define MIFI_VINT_PRESSURE
vertical interpolation type
Definition: mifi_constants.h:168
const std::string b
Definition: HybridSigmaPressure2.h:42
HybridSigmaPressure2(const std::string &a, const std::string &b, const std::string &ps, const std::string &p0="")
Definition: HybridSigmaPressure2.h:54