Skip to content
Cristian Lussana edited this page Mar 5, 2021 · 5 revisions

Test based on the spatial analysis of deviations between observations and the spatial trend in a region. The spatial analysis method considered is Optimal Interpolation (OI).

Around each observation, two circular regions are considered. An outer circle and an inner circle, both centered on the centroid. The outer circle is used to compute the spatial trend. The inner circle is used to compute the statistics used in the OI-based test. Bad observations are those that deviate too much with respect to the statistics computed through the neighbours.

Returned values are: the p-vector of the quality flags

flag description
-999 missing flag (observation not checked)
0 good observation
1 bad observation
11 isolated observation, it is the only observation inside the inner circle
12 isolated observation, less than num_min_outer observations inside outer circle

The list of parameters is (type vector = it is possible to specify a sequence of buddy checks):

parameter description type
sct do it, true or false logical
sct.code code identifying bad observation scalar
i.sct number of repetitions of the entire sequence of checks scalar
break.sct break the loop over the checks if less than this number of observations has been flagged scalar
transf.sct transform values scalar
doit.sct specify on a provider basis if the observations have to be tested (0=no; 1=yes) M-vector
prio.sct specify on a provider basis the priorities the observations have (the smaller the number, the higher the piority) M-vector
inner_radius.sct radius (m) of the inner circle N-vector
outer_radius.sct radius (m) of the outer circle N-vector
tpos.sct threshold when the observed value is greater than the spatial trend (N*M)-vector
tneg.sct threshold when the observed value is smaller than the spatial trend (N*M)-vector
eps2.sct relative precision (N*M)-vector
background_elab_type.sct background elaboration N-vector
num_min_outer.sct minimum number of observations required inside the outer circle N-vector
num_max_outer.sct maximum number of observations used N-vector
num_min_prof.sct background elaboration N-vector
min_elev_diff.sct background elaboration N-vector
min_horizontal_scale.sct lower limit for the horizontal decorrelation length scale in OI correlation function N-vector
max_horizontal_scale.sct lower limit for the horizontal decorrelation length scale in OI correlation function N-vector
kth_closest_obs_horizontal_scale.sct horizontal decorrelation length scale in OI correlation function is the average distance between an observation location and the k-th closest location N-vector
vertical_scale.sct vertical decorrelation length scale in OI correlation function N-vector

Notes:

  • N-vectors. where N is the number of buddy checks composing the sequence of checks.
  • M-vectors. where M is the number of providers.
  • (N*M)-vectors. for each buddy check in the sequence and for each provider, specify one value.
  • doit.sct. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
  • prio.sct. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
  • tpos(tneg).sct. one value for each pair provider/test. If only one value is specified, it is assumed it is the same for all providers.
  • eps2.sct. ratio between observation error variance and background error variance. One value for each pair provider/test. If only one value is specified, it is assumed it is the same for all providers.
  • other vectors, if just one scalar value is passed, then it is usually recycled for all elements.

R-examples

#!/bin/bash
#==============================================================================
export TITANR_PATH=/home/cristianl/projects/titanlab/R/functions
../titan.r --input.files data/privateObs_20180326T08Z.txt data/kdvh_Norway_wmo_2018032608.txt data/kdvh_Norway_nowmo_nomet_2018032608.txt data/kdvh_Norway_nowmo_met_2018032608.txt data/smhi_Sweden_2018032608.txt --output.file ~/data/out.txt --config.files ini/input.ini ini/test_titan.ini ini/buddy.ini ini/fgt.ini ini/sct_resistant.ini ini/sct_fg.ini --fg.files ini/fg_det.ini ini/fg_ens.ini
conf <- list(
# M = 5 observation providers
#
#------------------------------------------------------------------------------
             sct = F,
             sct.code = 5,
             transf.sct = F,
             i.sct = 10,
             break.sct = 0, 
# M vectors ((either 1 value or M) 
             doit.sct = 1,
             prio.sct = c(4,1,3,2,1),
# N = 2 sct checks (either 1 value or N)
             inner_radius.sct = c( 10000, 20000),
             outer_radius.sct = c( 30000, 60000),
             background_elab_type.sct = "VerticalProfileTheilSen",
             num_min_outer.sct = 3,
             num_max_outer.sct = 50,
             num_min_prof.sct = 5,
             min_elev_diff.sct = 10,
             min_horizontal_scale.sct = 1000,
             max_horizontal_scale.sct = 25000,
             kth_closest_obs_horizontal_scale.sct = 3,
             vertical_scale.sct = 200,
# M * N (either 1 value or M*N)
             eps2.sct = 0.5,
             tpos.sct = 2,
             tneg.sct = 2
            )