MeteoIODoc 20241221.207bde49
PmodIO.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef PMODIO_H
20#define PMODIO_H
21
22#include <meteoio/IOInterface.h>
24
25#include <string>
26
27namespace mio {
28
37class PmodIO : public IOInterface {
38 public:
39 PmodIO(const std::string& configfile);
40 PmodIO(const PmodIO&);
41 PmodIO(const Config& cfgreader);
42
43 virtual void readStationData(const Date& date, std::vector<StationData>& vecStation);
44 virtual void readMeteoData(const Date& dateStart, const Date& dateEnd,
45 std::vector< std::vector<MeteoData> >& vecvecMeteo);
46
47 private:
48 void parseInputOutputSection();
49 MeteoData createTemplate(const std::vector<std::string>& fields) const;
50 MeteoData createTemplate(std::ifstream &fin, const char& eoln) const;
51
52 Coords location;
53 std::string name, id, filename, inpath;
54 const Config cfg;
55 double in_TZ;
56 static const double plugin_nodata; //plugin specific nodata value, e.g. -999
57};
58
59} //namespace
60#endif
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle geographic coordinate systems. This class offers an easy way to transparently conve...
Definition: Coords.h:83
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
A class representing the IO Layer of the software Alpine3D. For each type of IO (File,...
Definition: IOInterface.h:98
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition: MeteoData.h:108
This class reads radiation data in raw file format from PMOD/WRC Institute.
Definition: PmodIO.h:37
virtual void readMeteoData(const Date &dateStart, const Date &dateEnd, std::vector< std::vector< MeteoData > > &vecvecMeteo)
Fill vecMeteo with a time series of objects corresponding to the interval indicated by dateStart and ...
Definition: PmodIO.cc:163
virtual void readStationData(const Date &date, std::vector< StationData > &vecStation)
Fill vecStation with StationData objects for a certain date of interest.
Definition: PmodIO.cc:119
PmodIO(const std::string &configfile)
Definition: PmodIO.cc:88
PmodIO(const PmodIO &)
Definition: Config.cc:31