Skip to content

SCT with FG

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

Test based on the spatial analysis of deviations between observations and background (or first-guess) fields in a circular region around each observation.

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 constants to keep in mind are:

  • M, the number of observation providers
  • B, the number of background fields (see --fg.files)
  • N, the total number of tests. Each test is applied to just one background field. The N-vector fglab.sct_fg matches the tests with the background fields. Example: fglab.sct_fg equals to (1,1,2), then: three tests are defined; the first two tests will make use of the first background file; the third test will make use of the second background field. The order of the background fields is given by the input order in fg.file

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

parameter description type
sct_fg do it, true or false logical
code.sct_fg code identifying bad observation flagged by the test scalar
i.sct_fg number of repetitions of the entire sequence of checks scalar
break.sct_fg break the loop over the tests if less than this number of observations has been flagged scalar
transf.sct_fg transform values before doing the check scalar
doit.sct_fg specify on a provider basis if the observations have to be tested (0=no; 1=yes) M-vector
prio.sct_fg specify on a provider basis the priorities the observations have (the smaller the number, the higher the piority) M-vector
inner_radius.sct_fg radius (m) of the inner circle N-vector
outer_radius.sct_fg radius (m) of the outer circle N-vector
fglab.sct_fg labels identifying which of the background fields have to be used in the test N-vector
tpos.sct_fg threshold when the observed value is greater than the background (N*M)-vector
tneg.sct_fg threshold when the observed value is smaller than the background (N*M)-vector
eps2.sct_fg relative precision (N*M)-vector
num_min_outer.sct_fg minimum number of observations required inside the outer circle N-vector
num_max_outer.sct_fg maximum number of observations used N-vector
min_horizontal_scale.sct_fg lower limit for the horizontal decorrelation length scale in OI correlation function N-vector
max_horizontal_scale.sct_fg lower limit for the horizontal decorrelation length scale in OI correlation function N-vector
kth_closest_obs_horizontal_scale.sct_fg 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_fg vertical decorrelation length scale in OI correlation function N-vector
aggn_radius.sct_fg radius defining the background aggregation area N-vector
num_max_aggn.sct_fg maximum number of points considered inside the background aggregation area N-vector

Notes:

  • (N*M)-vectors. for each check in the sequence and for each provider, specify one value.
  • doit.sct_fg. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
  • prio.sct_fg. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
  • tpos(tneg).sct_fg. 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.
  • eps2.sct_fg. 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.
  • The observation operator used to extract the background at an observation location is the average of all (up to num_max_aggn.fg) background values within a circle of aggn_radius.fg units (m) from the observation location. If a digital elevation model is associated to the background, then the extracted background value is adjusted considering the elevation difference between the observation location and the average of the digital elevation model adjusted_backg_value = original_backg_value + gamma * ( observation_elevation - aggregated_backg_elevation_from_dem) where gamma is usually set to -0.0065 °C/m. The background uncertainty is set to the standard deviation of the same background values used to compute the average.

R-examples

system("export TITANR_PATH=$HOME/projects/titanlab/R/functions; ../titan.r --input.files data/observation_test_ta_prid01_p02000_pGE020percent.txt data/observation_test_ta_prid02_p00100_pGE003percent.txt --output.file data/out.txt --config.files ini/ta_test_titan.ini ini/ta_sct_fg.ini --fg.files ini/background_test_ta_det.ini ini/background_test_ta_ens.ini")
conf <- list(
# M = 2 observation providers
#------------------------------------------------------------------------------

             sct_fg = T,
             code.sct_fg = 2,
             i.sct_fg = 10,
             break.sct_fg = 0,

# N=2 tests
             fglab.sct_fg = c( 1, 2), 

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

# N = 2 sct_dual checks (either 1 value or N)
             inner_radius.sct_fg = 10000,
             outer_radius.sct_fg = 40000,
             num_min_outer.sct_fg = 3,
             num_max_outer.sct_fg = 50,
             num_max_aggn.sct_fg = 4,
             aggn_radius.sct_fg = 50000,
             min_horizontal_scale.sct_fg = 1000,
             max_horizontal_scale.sct_fg = 25000,
             kth_closest_obs_horizontal_scale.sct_fg = 3,
             vertical_scale.sct_fg = 200000,

# M * N (either 1 value or M*N)
             tpos.sct_fg = c( 2, 2,
                              3, 3),
             tneg.sct_fg = 1,
             eps2.sct_fg = 0.1

            )