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 ½*(X1-X2)²), which makes it quite uninteresting... However, calculating the covariances (used to build the variogram) from time series (thus reflecting the time-correlation between stations) has not brought any significant improvements, so it is currently not used (although implemented).
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 VARIO argument (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 (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm) | |
virtual double | getQualityRating (const Date &i_date) |
virtual void | calculate (const DEMObject &dem, Grid2DObject &grid) |
Public Member Functions inherited from mio::InterpolationAlgorithm | |
InterpolationAlgorithm (const std::vector< std::pair< std::string, std::string > > &, const std::string &i_algo, const std::string &i_param, TimeSeriesManager &i_tsm) | |
virtual | ~InterpolationAlgorithm () |
std::string | getInfo () const |
Return an information string about the interpolation process. More... | |
Protected Member Functions | |
std::vector< std::vector< double > > | getTimeSeries (const bool &detrend_data) 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) |
Protected Member Functions inherited from mio::InterpolationAlgorithm | |
std::vector< double > | getData (const Date &i_date, const std::string &i_param) |
size_t | getData (const Date &i_date, const std::string &i_param, std::vector< double > &o_vecData, std::vector< StationData > &o_vecMeta) |
Protected Attributes | |
Fit1D | variogram |
std::vector< std::string > | vario_types |
Protected Attributes inherited from mio::InterpolationAlgorithm | |
TimeSeriesManager & | tsmanager |
Date | date |
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... | |
const std::string | param |
the parameter that we will interpolate More... | |
size_t | nrOfMeasurments |
Number of stations that have been used, so this can be reported to the user. More... | |
Additional Inherited Members | |
Public Attributes inherited from mio::InterpolationAlgorithm | |
const std::string | algo |
mio::OrdinaryKrigingAlgorithm::OrdinaryKrigingAlgorithm | ( | const std::vector< std::pair< std::string, std::string > > & | vecArgs, |
const std::string & | i_algo, | ||
const std::string & | i_param, | ||
TimeSeriesManager & | i_tsm | ||
) |
|
virtual |
Implements mio::InterpolationAlgorithm.
Reimplemented in mio::LapseOrdinaryKrigingAlgorithm.
|
protected |
|
protected |
|
protected |
|
virtual |
Implements mio::InterpolationAlgorithm.
|
protected |
|
protected |
|
protected |