Titanlib
Library for quality control algorithms
|
Titanlib. More...
Namespaces | |
util | |
Classes | |
class | Dataset |
Represents point and their observed values. More... | |
class | KDTree |
Functions | |
ivec | buddy_check (const vec &lats, const vec &lons, const vec &elevs, const vec &values, const vec &radius, const ivec &num_min, float threshold, float max_elev_diff, float elev_gradient, float min_std, int num_iterations, const ivec &obs_to_check=ivec()) |
Buddy check. More... | |
ivec | buddy_event_check (const vec &lats, const vec &lons, const vec &elevs, const vec &values, const vec &radius, const ivec &num_min, float event_threshold, float threshold, float max_elev_diff, float elev_gradient, int num_iterations, const ivec &obs_to_check=ivec()) |
void | initialize_omp () |
Sets the number of OpenMP threads to 1 if OMP_NUM_THREADS undefined. More... | |
ivec | isolation_check (const vec &lats, const vec &lons, int num_min, float radius) |
Isolation check. More... | |
ivec | isolation_check (const vec &lats, const vec &lons, const vec &elevs, int num_min, float radius, float vertical_radius) |
Isolation check with elevation. More... | |
ivec | range_check (const vec &values, const vec &min, const vec &max) |
Range check. More... | |
ivec | range_check_climatology (const vec &lats, const vec &lons, const vec &elevs, const vec &values, int unixtime, const vec &pos, const vec &neg) |
ivec | sct (const vec &lats, const vec &lons, const vec &elevs, const vec &values, int num_min, int num_max, float inner_radius, float outer_radius, int num_iterations, int num_min_prof, float min_elev_diff, float min_horizontal_scale, float vertical_scale, const vec &pos, const vec &neg, const vec &eps2, vec &prob_gross_error, vec &rep) |
Spatial Consistency Test. More... | |
ivec | sct_old (const vec &lats, const vec &lons, const vec &elevs, const vec &values, int nmin, int nmax, int num_min_prof, float min_elev_diff, float min_horizontal_scale, float dz, const vec &pos, const vec &neg, const vec &eps2, vec &prob_gross_error, vec &rep, ivec &boxids) |
Old version of the spatial consistency test (for testing purposes only) More... | |
void | set_omp_threads (int num) |
Set the number of OpenMP threads to use. More... | |
std::string | version () |
Titanlib.
ivec titanlib::buddy_check | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
const vec & | values, | ||
const vec & | radius, | ||
const ivec & | num_min, | ||
float | threshold, | ||
float | max_elev_diff, | ||
float | elev_gradient, | ||
float | min_std, | ||
int | num_iterations, | ||
const ivec & | obs_to_check = ivec() |
||
) |
Buddy check.
Compares a station to all its neighbours within a certain distance
lats | vector of latitudes [deg] |
lons | vector of longitudes [deg] |
elevs | vector of elevations [m] |
values | vector of observation values |
radius | search radius [m] |
num_min | the minimum number of buddies a station can have |
threshold | the threshold for flagging a station |
max_elev_diff | the maximum difference in elevation for a buddy (if negative will not check for heigh difference) |
elev_gradient | linear elevation gradient with height. For temperature, use something like -0.0065. |
min_std | |
num_iterations | |
obs_to_check | the observations that will be checked (since can pass in observations that will not be checked) |
flags | vector of return flags |
ivec titanlib::buddy_event_check | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
const vec & | values, | ||
const vec & | radius, | ||
const ivec & | num_min, | ||
float | event_threshold, | ||
float | threshold, | ||
float | max_elev_diff, | ||
float | elev_gradient, | ||
int | num_iterations, | ||
const ivec & | obs_to_check = ivec() |
||
) |
void titanlib::initialize_omp | ( | ) |
Sets the number of OpenMP threads to 1 if OMP_NUM_THREADS undefined.
Isolation check.
Checks that a station is not located alone
lats | vector of latitudes [deg] |
lons | vector of longitudes [deg] |
num_min | required number of observations |
radius | search radius [m] |
flags | vector of return flags |
ivec titanlib::isolation_check | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
int | num_min, | ||
float | radius, | ||
float | vertical_radius | ||
) |
Isolation check with elevation.
Checks that a station is not located alone
lats | Vector of latitudes [deg] |
lons | Vector of longitudes [deg] |
elevs | Vector of elevations [m] |
num_min | Required number of observations |
radius | Search radius [m] |
vertical_radius | Vertical search radius [m] |
flags | Vector of return flags |
Range check.
Checks observation is within the ranges given
values | vector of observations |
min | min allowed value |
max | max allowed value |
flags | vector of return flags |
ivec titanlib::range_check_climatology | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
const vec & | values, | ||
int | unixtime, | ||
const vec & | pos, | ||
const vec & | neg | ||
) |
ivec titanlib::sct | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
const vec & | values, | ||
int | num_min, | ||
int | num_max, | ||
float | inner_radius, | ||
float | outer_radius, | ||
int | num_iterations, | ||
int | num_min_prof, | ||
float | min_elev_diff, | ||
float | min_horizontal_scale, | ||
float | vertical_scale, | ||
const vec & | pos, | ||
const vec & | neg, | ||
const vec & | eps2, | ||
vec & | prob_gross_error, | ||
vec & | rep | ||
) |
Spatial Consistency Test.
num_min_prof | Minimum number of observations to compute vertical profile |
inner_radius | Radius for flagging [m] |
outer_radius | Radius for computing OI and background [m] |
min_elev_diff | Minimum elevation difference to compute vertical profile [m] |
min_horizontal_scale | Minimum horizontal decorrelation length [m] |
vertical_scale | Vertical decorrelation length [m] |
pos | Positive deviation allowed |
neg | Negative deviation allowed |
eps2 | |
prob_gross_error | Probability of gross error for each observation |
rep | Coefficient of representativity |
ivec titanlib::sct_old | ( | const vec & | lats, |
const vec & | lons, | ||
const vec & | elevs, | ||
const vec & | values, | ||
int | nmin, | ||
int | nmax, | ||
int | num_min_prof, | ||
float | min_elev_diff, | ||
float | min_horizontal_scale, | ||
float | dz, | ||
const vec & | pos, | ||
const vec & | neg, | ||
const vec & | eps2, | ||
vec & | prob_gross_error, | ||
vec & | rep, | ||
ivec & | boxids | ||
) |
Old version of the spatial consistency test (for testing purposes only)
void titanlib::set_omp_threads | ( | int | num | ) |
Set the number of OpenMP threads to use.
Overwrides OMP_NUM_THREAD env variable.
std::string titanlib::version | ( | ) |