MeteoIODoc 20260620.13b5b0a5
Environmental timeseries pre-processing
Loading...
Searching...
No Matches
Meteo1DInterpolator.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 METEO1DINTERPOLATOR_H
20#define METEO1DINTERPOLATOR_H
21
23#include <meteoio/Config.h>
24#include <meteoio/dataQA.h>
27#include <meteoio/meteoFilters/ProcessingBlock.h> //for ProcessingProperties
28
29#include <string>
30#include <vector>
31#include <map>
32#include <utility>
33
34namespace mio {
90 public:
91
106 Meteo1DInterpolator(const Config& in_cfg, const char& i_rank=1, const IOUtils::OperationMode &i_mode=IOUtils::STD);
108
117 bool resampleData(const Date& date, const std::string& stationHash, const std::vector<MeteoData>& vecM, MeteoData& md);
118
122 void resetResampling();
123
124 void getWindowSize(ProcessingProperties& o_properties) const;
125
127 const std::string toString() const;
128
129 private:
130 std::vector< std::pair<std::string, std::string> > getArgumentsForAlgorithm(const std::string& parname, const std::string& algorithm) const;
131 void parse_args(const Config &in_cfg);
132
133 std::map< std::string, ResamplingStack > mapAlgorithms; //per parameter interpolation algorithms
134 const Config& cfg;
135 double max_gap_size;
136 bool enable_resampling;
137 DataQA data_qa;
138 std::string gap_size_key; // To support window size for now; TODO: remove at some point
140 char rank;
141
142 public:
143 static const std::string interpol_section;
144};
145
146
147} //end namespace
148
149#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 for handling data quality assurance logging.
Definition dataQA.h:37
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition Date.h:87
A class that can resample MeteoData objects.
Definition Meteo1DInterpolator.h:89
static const std::string interpol_section
Definition Meteo1DInterpolator.h:143
Meteo1DInterpolator(const Meteo1DInterpolator &org)=default
void getWindowSize(ProcessingProperties &o_properties) const
Definition Meteo1DInterpolator.cc:96
bool resampleData(const Date &date, const std::string &stationHash, const std::vector< MeteoData > &vecM, MeteoData &md)
A function that executes all the resampling algorithms that have been setup in the constructor.
Definition Meteo1DInterpolator.cc:104
Meteo1DInterpolator & operator=(const Meteo1DInterpolator &)
Assignement operator.
Definition Meteo1DInterpolator.cc:187
void resetResampling()
Call each ResamplingAlgorithms to reset its cached data (as might be needed after a rebuffer)
Definition Meteo1DInterpolator.cc:179
const std::string toString() const
Definition Meteo1DInterpolator.cc:198
A class to represent a singular measurement received from one station at a certain time (represented ...
Definition MeteoData.h:108
Definition ProcessingBlock.h:36
OperationMode
Keywords for mode of operation. Please keep all the GRID_xxx last!
Definition IOUtils.h:63
@ STD
default: extract timeseries from timeseries or grids from grids or spatially interpolate timeseries
Definition IOUtils.h:64
Definition Config.cc:34