Skip to content

SCT dual

Cristian Lussana edited this page Mar 30, 2021 · 1 revision

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 checks):

parameter description type
sct_dual do it, true or false logical
code.sct_dual code identifying bad observation flagged by the test scalar
i.sct_dual number of repetitions of the entire sequence of checks scalar
break.sct_dual break the loop over the tests if less than this number of observations has been flagged scalar
doit.sct_dual specify on a provider basis if the observations have to be tested (0=no; 1=yes) M-vector
prio.sct_dual specify on a provider basis the priorities the observations have (the smaller the number, the higher the piority) M-vector
event_thresholds.sct_dual event threshold used to divide the dataset into "yes, the event happend" or "no, the event did not happen". Either a single value or one value for each test AND provider (e.g. N tests, M providers; then N*M values; order is: val-1 (test-1,provider-1), val-2 (test-1,provider-2), val-3 (test-1,provider-3), ... ). (N*M)-vector
conditions.sct_dual condition used to divide the dataset into "yes, the event happend" or "no, the event did not happen". One of: "Eq", "Gt", "Geq", "Lt", "Leq". Either one value valid for all N or N values. N-vector
thr_relinfo.sct_dual SCT dual threshold for the relative information content (typically a number from 0 to 1). Useful to avoid flagging observations in areas where there is a transition between "yes" and "no". Either a single value or one value for each test AND provider (e.g. N tests, M providers; then N*M values; order is: val-1 (test-1,provider-1), val-2 (test-1,provider-2), val-3 (test-1,provider-3), ... ). (N*M)-vector
inner_radius.sct_dual radius (m) of the inner circle N-vector
outer_radius.sct_dual radius (m) of the inner circle N-vector
num_min_outer.sct_dual minimum number of observations required inside the outer circle N-vector
num_max_outer.sct_dual maximum number of observations used N-vector
min_horizontal_scale.sct_dual lower limit for the horizontal decorrelation length scale in OI correlation function N-vector
max_horizontal_scale.sct_dual upper limit for the horizontal decorrelation length scale in OI correlation function N-vector
kth_closest_obs_horizontal_scale.sct_dual 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_dual vertical decorrelation length scale in OI correlation function N-vector

R-examples

# rr1_sct_dual.ini
conf <- list(
# M = 2 observation providers
#------------------------------------------------------------------------------

             sct_dual = T,
             code.sct_dual = 3,
             i.sct_dual = 10,
             break.sct_dual = 0,

# M vectors ((either 1 value or M) 
             doit.sct_dual = 1,
             prio.sct_dual = 1,

# N = 4 sct_dual checks (either 1 value or N)
             inner_radius.sct_dual = 20000,
             outer_radius.sct_dual = 50000,
             num_min_outer.sct_dual = 10,
             num_max_outer.sct_dual = 30,
             min_horizontal_scale.sct_dual = 2500,
             max_horizontal_scale.sct_dual = 10000,
             kth_closest_obs_horizontal_scale.sct_dual = 3,
             vertical_scale.sct_dual = 200000,
             conditions.sct_dual = "Gt",

# M * N (either 1 value or M*N)
             thr_relinfo.sct_dual = 0.5,
#                                          
             event_thresholds.sct_dual = 0.1

            )
#!/usr/bin/env Rscript

# Test TITAN for hourly precipitation

system("export TITANR_PATH=$HOME/projects/titanlab/R/functions;../titan.r --input.files data/observation_test_rr1_prid01_p02000_zero003percent.txt data/observation_test_rr1_prid02_p00100_zero001percent.txt --output.file data/out.txt --config.files ini/rr1_test_titan.ini ini/rr1_sct_dual.ini")