MI - Fimex
CDMReaderUtils.h
Go to the documentation of this file.
1 /*
2  * Fimex, CDMReaderUtils.h
3  *
4  * (C) Copyright 2010, 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: Sep 10, 2010
24  * Author: Heiko Klein
25  */
26 
27 #ifndef CDMREADERUTILS_H_
28 #define CDMREADERUTILS_H_
29 
30 #include "fimex/CDMReader.h"
31 #include <boost/date_time/posix_time/posix_time_types.hpp>
32 #include <boost/shared_ptr.hpp>
33 #include <vector>
34 
35 namespace MetNoFimex
36 {
37 
53 {
54  void operator()(void const *) const {}
55 };
56 
65 boost::posix_time::ptime getUniqueForecastReferenceTime(boost::shared_ptr<CDMReader> reader);
66 
77 std::vector<double> getDataSliceInUnit(const boost::shared_ptr<CDMReader>& reader, const std::string& var, const std::string& unit, int unLimDimPos);
78 
82 std::size_t estimateCDMDataSize(const CDM& cdm);
83 
94 bool compareCDMVarShapes(const CDM& cdm1, const std::string& varName1, const CDM& cdm2, const std::string& varName2);
95 
96 
103 std::string findUniqueDimVarName(const CDM& cdm, std::string baseVar);
104 
108 void generateProjectionCoordinates(boost::shared_ptr<CDMReader>& reader);
109 
110 }
111 #endif /* CDMREADERUTILS_H_ */
basic_string< char > string
std::size_t estimateCDMDataSize(const CDM &cdm)
Data structure of the Common Data Model.
Definition: CDM.h:54
Definition: C_CDMReader.h:35
Definition: CDMReaderUtils.h:52
bool compareCDMVarShapes(const CDM &cdm1, const std::string &varName1, const CDM &cdm2, const std::string &varName2)
boost::posix_time::ptime getUniqueForecastReferenceTime(boost::shared_ptr< CDMReader > reader)
void operator()(void const *) const
Definition: CDMReaderUtils.h:54
std::string findUniqueDimVarName(const CDM &cdm, std::string baseVar)
std::vector< double > getDataSliceInUnit(const boost::shared_ptr< CDMReader > &reader, const std::string &var, const std::string &unit, int unLimDimPos)
void generateProjectionCoordinates(boost::shared_ptr< CDMReader > &reader)