MI - Fimex
OceanSG1.h
Go to the documentation of this file.
1 /*
2  * Fimex, OceanSG1.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 OCEANSG1_H_
28 #define OCEANSG1_H_
29 
31 
32 namespace MetNoFimex
33 {
43 {
44 protected:
45  int (*heightConversionFunction)(size_t n, double h, double h_c, double zeta, const double* sigma, const double* C, double* z);
46 public:
47  const std::string s;
48  const std::string C;
51  /* optional */
62  OceanSG1(const std::string& s, const std::string& C, const std::string& depth, const std::string& depth_c, const std::string& eta = "");
63  virtual ~OceanSG1() {}
68  static const std::string NAME() {return "ocean_s_coordinate_g1";}
72  virtual std::string getName() const { return NAME(); }
73  virtual int getPreferredVerticalType() const { return MIFI_VINT_DEPTH; }
74  virtual std::string getParameterString() const { return "s="+s+",C="+C+",depth="+depth+",depth_c="+depth_c+",eta="+eta; }
75  virtual bool isComplete() const {return s != "" && C != "" && depth != "" && depth_c != "";}
76 protected:
77  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;
78  virtual boost::shared_ptr<ToVLevelConverter> getAltitudeConverter(const boost::shared_ptr<CDMReader>& reader, size_t unLimDimPos, boost::shared_ptr<const CoordinateSystem> cs, size_t nx, size_t ny, size_t nz, size_t nt) const;
79 };
80 
81 } /* namespace MetNoFimex */
82 #endif /* OCEANSG1_H_ */
Definition: OceanSG1.h:42
basic_string< char > string
virtual ~OceanSG1()
Definition: OceanSG1.h:63
Definition: C_CDMReader.h:35
virtual bool isComplete() const
Definition: OceanSG1.h:75
Definition: VerticalTransformation.h:79
#define MIFI_VINT_DEPTH
vertical interpolation type
Definition: mifi_constants.h:182
OceanSG1(const std::string &s, const std::string &C, const std::string &depth, const std::string &depth_c, const std::string &eta="")
const std::string depth_c
Definition: OceanSG1.h:50
const std::string s
Definition: OceanSG1.h:47
const std::string C
Definition: OceanSG1.h:48
const std::string depth
Definition: OceanSG1.h:49
virtual std::string getName() const
Definition: OceanSG1.h:72
static const std::string NAME()
Definition: OceanSG1.h:68
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 boost::shared_ptr< ToVLevelConverter > getAltitudeConverter(const boost::shared_ptr< CDMReader > &reader, size_t unLimDimPos, boost::shared_ptr< const CoordinateSystem > cs, size_t nx, size_t ny, size_t nz, size_t nt) const
int(* heightConversionFunction)(size_t n, double h, double h_c, double zeta, const double *sigma, const double *C, double *z)
Definition: OceanSG1.h:45
const std::string eta
Definition: OceanSG1.h:52
virtual std::string getParameterString() const
list the parameters
Definition: OceanSG1.h:74
virtual int getPreferredVerticalType() const
the most natural vertical type, one of the MIFI_VINT_* in fimex/mifi_constants.h
Definition: OceanSG1.h:73