Ordinary kriging. This implements ordinary krigging (see https://secure.wikimedia.org/wikipedia/en/wiki/Kriging) with user-selectable variogram model (see https://secure.wikimedia.org/wikipedia/en/wiki/Variogram). More details about the specific computation steps of kriging are provided in Interpol2D::ODKriging.
The variogram is currently computed with the current data (as 1/2*(X1-X2)^2), which makes it quite uninteresting... The next improvement will consist in calculating the covariances (used to build the variogram) from time series (thus reflecting the time-correlation between stations).
Please note that the variogram and krigging coefficients are re-computed fresh for each new grid (or time step). The available variogram models are found in Fit1D::regression and given as optional arguments (by default, LINVARIO is used). Several models can be given, the first that can fit the data will be used for the current timestep:
#include <ODKrigAlgorithm.h>
Public Member Functions | |
OrdinaryKrigingAlgorithm (Meteo2DInterpolator &i_mi, const std::vector< std::string > &i_vecArgs, const std::string &i_algo, TimeSeriesManager &i_tsmanager, GridsManager &i_gridsmanager) | |
virtual double | getQualityRating (const Date &i_date, const MeteoData::Parameters &in_param) |
virtual void | calculate (const DEMObject &dem, Grid2DObject &grid) |
![]() | |
InterpolationAlgorithm (Meteo2DInterpolator &i_mi, const std::vector< std::string > &i_vecArgs, const std::string &i_algo, TimeSeriesManager &i_tsmanager, GridsManager &i_gridsmanager) | |
virtual | ~InterpolationAlgorithm () |
std::string | getInfo () const |
Return an information string about the interpolation process. More... | |
Protected Member Functions | |
size_t | getTimeSeries (const bool &detrend_data, std::vector< std::vector< double > > &vecVecData) const |
void | getDataForEmpiricalVariogram (std::vector< double > &distData, std::vector< double > &variData) const |
void | getDataForVariogram (std::vector< double > &distData, std::vector< double > &variData, const bool &detrend_data=false) const |
bool | computeVariogram (const bool &detrend_data=false) |
![]() | |
size_t | getData (const Date &i_date, const MeteoData::Parameters &i_param, std::vector< double > &o_vecData) |
size_t | getData (const Date &i_date, const MeteoData::Parameters &i_param, std::vector< double > &o_vecData, std::vector< StationData > &o_vecMeta) |
void | getTrend (const std::vector< double > &vecAltitudes, const std::vector< double > &vecDat, Fit1D &trend) const |
Read the interpolation arguments and compute the trend accordingly. More... | |
void | simpleWindInterpolate (const DEMObject &dem, const std::vector< double > &vecDataVW, const std::vector< double > &vecDataDW, Grid2DObject &VW, Grid2DObject &DW) |
Protected Attributes | |
Fit1D | variogram |
![]() | |
Meteo2DInterpolator & | mi |
TimeSeriesManager & | tsmanager |
GridsManager & | gridsmanager |
Date | date |
const std::vector< std::string > | vecArgs |
std::vector< MeteoData > | vecMeteo |
std::vector< double > | vecData |
store the measurement for the given parameter More... | |
std::vector< StationData > | vecMeta |
store the station data for the given parameter More... | |
std::ostringstream | info |
to store some extra information about the interplation process More... | |
MeteoData::Parameters | param |
the parameter that we will interpolate More... | |
size_t | nrOfMeasurments |
the available number of measurements More... | |
Additional Inherited Members | |
![]() | |
const std::string | algo |
![]() | |
static size_t | getStationAltitudes (const std::vector< StationData > &i_vecMeta, std::vector< double > &o_vecData) |
static void | detrend (const Fit1D &trend, const std::vector< double > &vecAltitudes, std::vector< double > &vecDat, const double &min_alt=-1e4, const double &max_alt=1e4) |
static void | retrend (const DEMObject &dem, const Fit1D &trend, Grid2DObject &grid, const double &min_alt=-1e4, const double &max_alt=1e4) |
|
inline |
|
virtual |
Implements mio::InterpolationAlgorithm.
Reimplemented in mio::LapseOrdinaryKrigingAlgorithm.
|
protected |
|
protected |
|
protected |
|
virtual |
Implements mio::InterpolationAlgorithm.
|
protected |
|
protected |