MeteoIODoc 20260313.ab0361e8
Environmental timeseries pre-processing
Loading...
Searching...
No Matches
DataGenerator.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2013 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
20#ifndef DATAGENERATOR_H
21#define DATAGENERATOR_H
22
23#include <meteoio/Config.h>
26#include <meteoio/dataQA.h>
27
28#include <vector>
29#include <map>
30#include <set>
31
32namespace mio {
33
45 public:
46 DataGenerator(const Config& cfg, const std::set<std::string>& params_to_generate = std::set<std::string>());
47 DataGenerator(const DataGenerator& c) : mapAlgorithms(c.mapAlgorithms), data_qa(c.data_qa) {}
48 virtual ~DataGenerator();
49
50 void fillMissing(METEO_SET& vecMeteo, const std::vector<METEO_SET>& fullDataset, const std::vector<size_t>& stations_idx) const;
51 void fillMissing(METEO_SET& vecMeteo) const; //simplified call similar to above
52 void fillMissing(std::vector<METEO_SET>& vecVecMeteo) const;
53
55
56 const std::string toString() const;
57 private:
58 static std::set<std::string> getParameters(const Config& cfg);
59 static std::vector< GeneratorAlgorithm* > buildStack(const Config& cfg, const std::string& parname);
60
61 std::map< std::string, std::vector<GeneratorAlgorithm*> > mapAlgorithms; //per parameter data creators algorithms
62 static const std::string cmd_section, cmd_pattern, arg_pattern;
63 DataQA data_qa;
64};
65
66} //end namespace
67
68#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 generate meteo data from user-selected models or parametrizations. This class sits in betw...
Definition DataGenerator.h:44
virtual ~DataGenerator()
Definition DataGenerator.cc:54
DataGenerator & operator=(const DataGenerator &source)
Definition DataGenerator.cc:63
DataGenerator(const DataGenerator &c)
Definition DataGenerator.h:47
const std::string toString() const
Definition DataGenerator.cc:246
void fillMissing(METEO_SET &vecMeteo, const std::vector< METEO_SET > &fullDataset, const std::vector< size_t > &stations_idx) const
generate data to fill missing data points. This relies on data generators defined by the user for eac...
Definition DataGenerator.cc:94
A class for handling data quality assurance logging.
Definition dataQA.h:37
Definition Config.cc:34
std::vector< MeteoData > METEO_SET
Definition MeteoData.h:32