-
Notifications
You must be signed in to change notification settings - Fork 6
FGT
Cristian Lussana edited this page Mar 30, 2021
·
1 revision
Test based on the statistics of the deviations between observations and background (or first-guess) fields in a circular region around each observation. 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
fgt_fglab.fgt
matches the tests with the background fields. Example:fgt_fglab.fgt
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 infg.file
The list of parameters is (type vector = it is possible to specify a sequence of buddy checks):
parameter | description | type |
---|---|---|
fgt | do it, true or false | logical |
code.fgt | code identifying bad observation flagged by the test | scalar |
i.fgt | number of repetitions of the entire sequence of checks | scalar |
break.fgt | break the loop over the tests if less than this number of observations has been flagged | scalar |
transf.fgt | transform values before doing the check | scalar |
doit.fgt | specify on a provider basis if the observations have to be tested (0=no; 1=yes) | M-vector |
prio.fgt | specify on a provider basis the priorities the observations have (the smaller the number, the higher the piority) | M-vector |
fglab.fgt | labels identifying which of the background fields have to be used in the test | N-vector |
circle_radius.fgt | radius (m) of the circle | N-vector |
tpos.fgt | threshold when the observed value is greater than the background | (N*M)-vector |
tneg.fgt | threshold when the observed value is smaller than the background | (N*M)-vector |
num_min_circle.fgt | minimum number of observations required inside the outer circle | N-vector |
num_max_circle.fgt | maximum number of observations used | N-vector |
aggn_radius.fgt | radius defining the background aggregation area | N-vector |
num_max_aggn.fgt | 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.fgt. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
- prio.fgt. one value for each provider. If only one value is specified, it is assumed it is the same for all providers.
- tpos(tneg).fgt. 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.
- The observation operator used to extract the background at an observation location is the average of all (up to
num_max_aggn.fgt
) background values within a circle ofaggn_radius.fgt
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 modeladjusted_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.
#!/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_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_fgt.ini --fg.files ini/background_test_ta_det.ini ini/background_test_ta_ens.ini")
conf <- list(
# M = 2 observation providers
# N = 3 fgt (2 over fg_lab1, 1 over fg_lab2)
# B = 2 background fields:
# 1 deterministic (fg_lab=1); 1 ensemble (9 members) (fg_lab=2)
#------------------------------------------------------------------------------
fgt = T,
fgt.code=11,
i.fgt = 10,
break.fgt = 0,
transf.fgt = F,
# M vectors
doit.fg = 1,
prio.fg = 1,
# N vectors
fglab.fgt = c( 1, 1, 2),
circle_radius.fgt = c( 50000, 20000, 20000),
num_max_aggn.fgt = c( 4, 4, 4),
aggn_radius.fgt = c( 5000, 5000, 5000),
num_min_circle.fgt = 3,
num_max_circle.fgt = c( 20, 20, 50),
# M * N
tpos.fgt = c( 5, 5,
5, 5,
5, 5),
tneg.fgt = 5
)
Copyright (C) 2021 MET Norway. Titan is licensed under GPL version 3 or (at your option) any later version.