This grid resampling class builds time series at all grid positions and sends them to meteo 1d resampling algorithms to perform the interpolations.
You can use the algorithms available at Resampling overview like follows:
#include <GridTimeseriesResampling.h>
Public Member Functions | |
GridTimeseriesResampling (const std::string &i_algoname, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &vecArgs, const Config &in_cfg) | |
Constructor for a grid resampling algorithm. More... | |
void | resample (const Date &date, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid) |
Perform temporal grid resampling. More... | |
std::string | toString () const |
Print this algorithm's properties to a stream. More... | |
Public Member Functions inherited from mio::GridResamplingAlgorithm | |
GridResamplingAlgorithm (const std::string &algorithm, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &) | |
Facade constructor for a generic grid resampling algorithm. More... | |
virtual | ~GridResamplingAlgorithm ()=default |
void | setWindowSize (const double &window_size) |
Set this algorithm's window size to something other than the default value. More... | |
virtual void | resample (const Date &date, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid)=0 |
virtual std::string | toString () const =0 |
Additional Inherited Members | |
Protected Attributes inherited from mio::GridResamplingAlgorithm | |
const std::string | algo |
const std::string | parname |
double | grid_window_size |
mio::GridTimeseriesResampling::GridTimeseriesResampling | ( | const std::string & | i_algoname, |
const std::string & | i_parname, | ||
const double & | dflt_window_size, | ||
const std::vector< std::pair< std::string, std::string > > & | vecArgs, | ||
const Config & | in_cfg | ||
) |
Constructor for a grid resampling algorithm.
On initialization, a resampling object stores its user settings.
[in] | i_algoname | The current algorithm's semantic name. |
[in] | i_parname | The current meteo parameter's identifier. |
[in] | dflt_window_size | The default grid resampling window size. |
[in] | vecArgs | Vector of arguments (user settings) for this algorithm. Note that settings must |
[in] | in_cfg | Config object in order to be able to read configuration keys. be given for this algorithm's name (e. g. TA::TIMESERIES::EXTRAPOLATE = T for TA::TIMESERIES::ALGORITHM = LINEAR). |
|
virtual |
Perform temporal grid resampling.
This function performs the interpolation routine and returns a grid resampled to the desired date.
[in] | date | Date to resample the data to. |
[in] | all_grids | List of all grids available to this resampling algorithm, as well as their corresponding dates. |
[out] | resampled_grid | The temporally resampled grid. |
Implements mio::GridResamplingAlgorithm.
|
virtual |
Print this algorithm's properties to a stream.
Implements mio::GridResamplingAlgorithm.