MI - Fimex
VerticalTransformation.h
Go to the documentation of this file.
1 /*
2  * Fimex, VerticalTransformation.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: Heiko Klein
25  */
26 
27 #ifndef VERTICALTRANSFORMATION_H_
28 #define VERTICALTRANSFORMATION_H_
29 
30 #include <boost/shared_ptr.hpp>
31 #include <string>
32 #include <vector>
33 #include <iostream>
34 #include "fimex/mifi_constants.h"
35 
36 
37 
38 namespace MetNoFimex
39 {
40 
41 // forward declarations
42 class CDMReader;
43 class CoordinateSystem;
44 class ToVLevelConverter;
45 
80 {
81 public:
84  virtual std::string getName() const = 0;
86  virtual std::string getParameterString() const = 0;
88  virtual int getPreferredVerticalType() const = 0;
97  virtual bool isComplete() const = 0;
110  virtual boost::shared_ptr<ToVLevelConverter> getConverter(const boost::shared_ptr<CDMReader>& reader, int verticalType, size_t unLimDimPos, boost::shared_ptr<const CoordinateSystem> cs, size_t nx, size_t ny, size_t nz, size_t nt) const;
111 
113  boost::shared_ptr<ToVLevelConverter> getConverter(const boost::shared_ptr<CDMReader>& reader, int verticalType, size_t unLimDimPos, boost::shared_ptr<const CoordinateSystem> cs) const;
114 
115 protected:
116  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 = 0;
128  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;
140  virtual boost::shared_ptr<ToVLevelConverter> getHeightConverter(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;
141 
142 private:
143  boost::shared_ptr<ToVLevelConverter> getIdentityPressureConverter(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;
144  boost::shared_ptr<ToVLevelConverter> findPressureConverter(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;
145 };
146 
148 
149 } /* namespace MetNoFimex */
150 
151 
152 
153 #endif /* VERTICALTRANSFORMATION_H_ */
basic_string< char > string
virtual bool isComplete() const =0
virtual boost::shared_ptr< ToVLevelConverter > getConverter(const boost::shared_ptr< CDMReader > &reader, int verticalType, size_t unLimDimPos, boost::shared_ptr< const CoordinateSystem > cs, size_t nx, size_t ny, size_t nz, size_t nt) const
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 =0
basic_ostream< char > ostream
virtual std::string getParameterString() const =0
list the parameters
Definition: C_CDMReader.h:35
virtual ~VerticalTransformation()
Definition: VerticalTransformation.h:82
Definition: VerticalTransformation.h:79
virtual int getPreferredVerticalType() const =0
the most natural vertical type, one of the MIFI_VINT_* in fimex/mifi_constants.h
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
std::ostream & operator<<(std::ostream &out, CoordinateAxis ca)
virtual boost::shared_ptr< ToVLevelConverter > getHeightConverter(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
virtual std::string getName() const =0
the indentifier of the vertical transformation