MI - Fimex
CDMProcessor.h
Go to the documentation of this file.
1 /*
2  * Fimex, CDMProcessor.h
3  *
4  * (C) Copyright 2012, 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: Mar 19, 2012
24  * Author: Heiko Klein
25  */
26 
27 #ifndef CDMPROCESSOR_H_
28 #define CDMPROCESSOR_H_
29 
30 #include "fimex/CDMReader.h"
31 #include <boost/shared_ptr.hpp>
32 
33 namespace MetNoFimex
34 {
35 
36 // forward decl
37 struct CDMProcessorImpl;
38 
47 {
48 public:
49  CDMProcessor(boost::shared_ptr<CDMReader> dataReader);
50  virtual ~CDMProcessor();
54  void addVerticalVelocity();
62  void accumulate(const std::string& varName);
69  void deAccumulate(const std::string& varName);
78  void rotateVectorToLatLon(bool toLatLon, const std::vector<std::string>& varNameX, const std::vector<std::string>& varNameY, const std::vector<std::string>& stdNameX = std::vector<std::string>(0), const std::vector<std::string>& stdNameY = std::vector<std::string>(0));
83  void rotateAllVectorsToLatLon(bool toLatLon);
89  void rotateDirectionToLatLon(bool toLatLon, const std::vector<std::string>& varNames);
91  virtual DataPtr getDataSlice(const std::string& varName, size_t unLimDimPos);
92 private:
93  // pimpl
94  boost::shared_ptr<CDMProcessorImpl> p_;
95 
96 };
97 
98 } /* namespace MetNoFimex */
99 #endif /* CDMPROCESSOR_H_ */
void accumulate(const std::string &varName)
basic_string< char > string
virtual DataPtr getDataSlice(const std::string &varName, size_t unLimDimPos)
data-reading function to be called from the CDMWriter
Definition: CDMProcessor.h:46
boost::shared_ptr< Data > DataPtr
Definition: DataDecl.h:39
void rotateDirectionToLatLon(bool toLatLon, const std::vector< std::string > &varNames)
virtual DataPtr getDataSlice(const std::string &varName, size_t unLimDimPos)=0
data-reading function to be called from the CDMWriter
Definition: C_CDMReader.h:35
CDMProcessor(boost::shared_ptr< CDMReader > dataReader)
Basic interface for CDM reading and manipulation classes.
Definition: CDMReader.h:53
void rotateVectorToLatLon(bool toLatLon, const std::vector< std::string > &varNameX, const std::vector< std::string > &varNameY, const std::vector< std::string > &stdNameX=std::vector< std::string >(0), const std::vector< std::string > &stdNameY=std::vector< std::string >(0))
void rotateAllVectorsToLatLon(bool toLatLon)
void deAccumulate(const std::string &varName)