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