#include <InterpolationAlgorithms.h>
◆ Trend()
mio::Trend::Trend |
( |
const std::vector< std::pair< std::string, std::string > > & |
vecArgs, |
|
|
const std::string & |
algo, |
|
|
const std::string & |
i_param |
|
) |
| |
Build a Trend object.
This object is responsible for detrending / retrending the meteorological data. The following arguments are recognized:
- MULTILINEAR: use a multiple linear regression (on altitude, easting and northing) if possible, otherwise a "standard", simple linear regression will be used as fallback (default: false);
- RATE: to provide a user-defined lapse rate (SI units);
- SOFT: if set to true, the user provided lapse rate is only used when no lapse rate could be computed from the data (or if it was too bad, ie r²<0.6);
- FRAC: if set to true, the user provided lapse rate will be interpreted as "fractional", that is a relative change of the value as a function of the elevation (for example, +0.05% per meters given as 0.0005). In this case, no attempt to calculate the fractional lapse from the data is made. The lapse rate that might be reported to the user will be computed as {data average}*{user-defined rate} and is therefore NOT directly the user-defined lapse rate.
- TREND_MIN_ALT: all points at elevations less than this will be detrended/retrended as if at this provided elevation (optional);
- TREND_MAX_ALT: all points at elevations more than this will be detrended/retrended as if at this provided elevation (optional);
- Parameters
-
[in] | vecArgs | a vector containing all the arguments |
[in] | algo | the name of the algorithm calling it, for user-friendly error messages |
[in] | i_param | the meteorological parameter that is handled, for user-friendly error messages |
◆ detrend()
void mio::Trend::detrend |
( |
const std::vector< StationData > & |
vecMeta, |
|
|
std::vector< double > & |
vecDat |
|
) |
| |
Compute the trend according to the provided data and detrend vecDat.
- Parameters
-
[in] | vecMeta | Location information sorted similarly as the data in vecDat |
| vecDat | data for the interpolated parameter |
◆ getInfo()
std::string mio::Trend::getInfo |
( |
| ) |
const |
◆ has_user_lapse()
bool mio::Trend::has_user_lapse |
( |
| ) |
const |
|
inline |
◆ is_soft()
bool mio::Trend::is_soft |
( |
| ) |
const |
|
inline |
◆ retrend()
Re-apply the trend computed in a previous call to detrend() to the gridded results.
- Parameters
-
[in] | dem | digital elevation model (DEM) |
| grid | matching grid filled with data that has to be re-trended |
◆ toString()
std::string mio::Trend::toString |
( |
| ) |
const |
The documentation for this class was generated from the following files: