MeteoIODoc 2.11.0
mio::GridProcessor Class Reference

Detailed Description

This class is handled by a GridManager and performs grid filtering and temporal resampling.

Author
Michael Reisecker
Date
2021-09

#include <GridProcessor.h>

Public Member Functions

 GridProcessor (const Config &cfg)
 Constructor for a grid processor. More...
 
bool resample (const Date &date, const MeteoGrids::Parameters &parameter, const std::map< Date, Grid2DObject > &all_grids, Grid2DObject &resampled_grid)
 This function forwards interpolation requests. More...
 
double getWindowSize () const
 

Static Public Member Functions

static std::map< Date, Grid2DObject >::const_iterator seek (const Date &date, const std::map< Date, Grid2DObject > &grids, const bool &exact_match=false)
 Search a list of grids for a specific date. More...
 
static std::map< Date, Grid2DObject >::const_iterator seek_before (const Date &date, const std::map< Date, Grid2DObject > &grids)
 Find a grid that is available right after a specific date. More...
 
static std::map< Date, Grid2DObject >::const_iterator seek_after (const Date &date, const std::map< Date, Grid2DObject > &grids)
 Find a grid that is available before a specific date. More...
 

Constructor & Destructor Documentation

◆ GridProcessor()

mio::GridProcessor::GridProcessor ( const Config cfg)

Constructor for a grid processor.

A GridProcessor object manages grid filtering and grid resampling; the latter through a Grid1dInterpolator.

Parameters
[in]cfgThe current simulation's configuration.

Member Function Documentation

◆ getWindowSize()

double mio::GridProcessor::getWindowSize ( ) const
inline

◆ resample()

bool mio::GridProcessor::resample ( const Date date,
const MeteoGrids::Parameters parameter,
const std::map< Date, Grid2DObject > &  all_grids,
Grid2DObject resampled_grid 
)

This function forwards interpolation requests.

Delegate a resampling request to the Grid1dInterpolator (which will in turn forward the call to the actual interpolation routine).

Parameters
[in]dateDate to resample to.
[in]parameterMeteo parameter to resample.
[in]all_gridsA list of all grids to use for resampling, including the corresponding dates.
[out]resampled_gridGrid filled with resampled data.

◆ seek()

std::map< Date, Grid2DObject >::const_iterator mio::GridProcessor::seek ( const Date date,
const std::map< Date, Grid2DObject > &  grids,
const bool &  exact_match = false 
)
static

Search a list of grids for a specific date.

This function takes a map of date/grid combinations and searches it for a specific date.

Parameters
[in]dateDate to look for.
[in]gridsA map with the dates as keys, and corresponding grids as values.
[in]exact_matchDoes the date have to match exactly?
Returns
Iterator to the found entry (or the grid map end if n/a). If the match does not have to be exact, the grid found right before will be returned (as iterator).

◆ seek_after()

std::map< Date, Grid2DObject >::const_iterator mio::GridProcessor::seek_after ( const Date date,
const std::map< Date, Grid2DObject > &  grids 
)
static

Find a grid that is available before a specific date.

This function takes a map of date/grid combinations and searches it for the grid that comes right before a specified date.

Parameters
[in]dateDate to look for.
[in]gridsA map with the dates as keys, and corresponding grids as values.
Returns
Iterator to the found entry (or the grid map end if n/a).

◆ seek_before()

std::map< Date, Grid2DObject >::const_iterator mio::GridProcessor::seek_before ( const Date date,
const std::map< Date, Grid2DObject > &  grids 
)
static

Find a grid that is available right after a specific date.

This function takes a map of date/grid combinations and searches it for the first grid that comes after a specified date.

Parameters
[in]dateDate to look for.
[in]gridsA map with the dates as keys, and corresponding grids as values.
Returns
Iterator to the found entry (or the grid map end if n/a).

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