MeteoIODoc 20241221.207bde49
mio::GridLinearResampling Class Reference

Detailed Description

Point-wise linear interpolation between grids.

This algorithm performs linear interpolation between available grids. The syntax is the same as for timeseries interpolations; for example:

[GridInterpolations1D]
TA::RESAMPLE = LINEAR
Author
Michael Reisecker
Date
2021-09

#include <GridLinearResampling.h>

Public Member Functions

 GridLinearResampling (const std::string &algoname, const std::string &i_parname, const double &dflt_window_size, const std::vector< std::pair< std::string, std::string > > &vecArgs)
 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
 

Constructor & Destructor Documentation

◆ GridLinearResampling()

mio::GridLinearResampling::GridLinearResampling ( const std::string &  algoname,
const std::string &  i_parname,
const double &  dflt_window_size,
const std::vector< std::pair< std::string, std::string > > &  vecArgs 
)

Constructor for a grid resampling algorithm.

On initialization, a resampling object stores its user settings.

Parameters
[in]algonameThe current algorithm's semantic name.
[in]i_parnameThe current meteo parameter's identifier.
[in]dflt_window_sizeThe default grid resampling window size.
[in]vecArgsVector of arguments (user settings) for this algorithm.

Member Function Documentation

◆ resample()

void mio::GridLinearResampling::resample ( const Date date,
const std::map< Date, Grid2DObject > &  all_grids,
Grid2DObject resampled_grid 
)
virtual

Perform temporal grid resampling.

This function performs the interpolation routine and returns a grid resampled to the desired date.

Parameters
[in]dateDate to resample the data to.
[in]all_gridsList of all grids available to this resampling algorithm, as well as their corresponding dates.
[out]resampled_gridThe temporally resampled grid.

Implements mio::GridResamplingAlgorithm.

◆ toString()

std::string mio::GridLinearResampling::toString ( ) const
virtual

Print this algorithm's properties to a stream.

Returns
Semantic description of the algorithm's setup.

Implements mio::GridResamplingAlgorithm.


The documentation for this class was generated from the following files: