Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kvalobs:kvoss:system:qc2:flag:analysis [2010-01-17 00:40:40] paule |
kvalobs:kvoss:system:qc2:flag:analysis [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Qc2 Flag Analysis and Discussion ====== | ====== Qc2 Flag Analysis and Discussion ====== | ||
- | ===== Exisiting Specification ===== | + | Note: a number of Qc2 useinfo changes are coded in lib/ |
- | A general guide to setting values in Qc2 Control Flags is described in the following set of slides from Lars Andresen. The current algorithms and proposals for new algorithms are based on this: | + | ===== Existing Specification ===== |
+ | |||
+ | A general guide to setting values in Qc2 Control Flags is described in the following set of slides from Lars. The current algorithms and proposals for new algorithms are based on this: | ||
* [[https:// | * [[https:// | ||
- | ==== Redistirbution | + | ==== Redistribution |
^Controlflag Setting: |fd=7 | | ^Controlflag Setting: |fd=7 | | ||
- | ^Condition: |The algorithm is considered | + | ^Condition: |The algorithm is successful. | |
^Cfailed: |Updated to include algorithm name and type of interpolation used to generate the correction | ^Cfailed: |Updated to include algorithm name and type of interpolation used to generate the correction | ||
+ | ^ |(Also possible to use fd=A, fd=B, ... for other methods of redistribution, | ||
+ | |||
+ | **Examples** | ||
+ | |||
+ | An example of the redistribution of accumulated precipitation. Where successful estimation of corrected values occurs, the controlinfo(12), | ||
+ | |||
+ | < | ||
+ | |||
+ | BEFORE Qc2 | ||
+ | |||
+ | | ||
+ | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------------- | ||
+ | 53950 | 2007-12-07 06:00:00 | 9 | 110 | 2007-12-07 12:10:30 | 302 | 0 | 0 | 9 | 1140000000001000 | 7020400000000001 | QC1-2-72.b12: | ||
+ | 53950 | 2007-12-08 06:00:00 | | ||
+ | 53950 | 2007-12-09 06:00:00 | | ||
+ | 53950 | 2007-12-10 06:00:00 | 1.5 | 110 | 2007-12-10 11:25:20 | 302 | 0 | 0 | 1.5 | 1140000000002000 | 7330900000000001 | QC1-2-72.b12: | ||
+ | (4 rows) | ||
+ | |||
+ | AFTER Qc2 | ||
+ | |||
+ | kvalobs=# select * from data where stationid=53950 and obstime>' | ||
+ | | ||
+ | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------------------------------------- | ||
+ | 53950 | 2007-12-07 06:00:00 | 9 | 110 | 2007-12-07 12:10:30 | 302 | 0 | 0 | 9 | 1140000000001000 | 7020400000000001 | QC1-2-72.b12: | ||
+ | 53950 | 2007-12-08 06:00:00 | | ||
+ | 53950 | 2007-12-09 06:00:00 | | ||
+ | 53950 | 2007-12-10 06:00:00 | 1.5 | 110 | 2007-12-10 11:25:20 | 302 | 0 | 0 | 1.4 | 1140000000007000 | 5336900000000001 | QC1-2-72.b12: | ||
+ | (4 rows) | ||
+ | |||
+ | </ | ||
+ | |||
+ | NOTES: | ||
+ | * The operational deployed version of Qc2 will not state "Redis corrected was XX" in cfailed. This is just a convenience for ongoing testing. | ||
+ | * More examples of the control- and useinfo- behaviour are available in the [[https:// | ||
==== TAN-TAX Interpolation ==== | ==== TAN-TAX Interpolation ==== | ||
+ | |||
+ | Interpolation of single missing temperature values using the average of TAN and TAX corresponding to the same time interval. | ||
^Controlflag Setting: |ftime=1 | ^Controlflag Setting: |ftime=1 | ||
- | ^Condition: |The algorithm is considered | + | ^Condition: |The algorithm is successful | |
^Cfailed: |Algorithm method recorded. | ^Cfailed: |Algorithm method recorded. | ||
+ | |||
+ | **Examples** | ||
+ | |||
+ | < | ||
+ | Sample data before Qc2 | ||
+ | |||
+ | 59680|2008-03-19 05: | ||
+ | 59680|2008-03-19 06: | ||
+ | 59680|2008-03-19 07: | ||
+ | |||
+ | After the Qc2 algorithm the row with the missing line is updated as follows: | ||
+ | |||
+ | 59680|2020-03-19 06: | ||
+ | </ | ||
+ | |||
+ | **Discussion** (a summary of inputs from many different people, identities removed since this is the public wiki) | ||
+ | |||
+ | * ftime should influence useinfo(3) and useinfo(4), propose the useinfo algorithms need a complete redraft once we have an overview of the QC2 features. ((This page and associated links try to answer this request)). | ||
+ | |||
+ | * ftime is part of the useinfo(4) requirements but needs to be checked/ | ||
+ | |||
+ | * ftime is not yet included in the requirements for useinfo(3). This needs to be done | ||
+ | |||
+ | * In this particular example fhqc=7 " | ||
+ | |||
+ | * Currently for the operational configuration the condition set is "DO NOT OVERWRITE A VALUE ALREADY CORRECTED BY HQC". For development/ | ||
+ | |||
+ | * since HQC has put in a value in the corrected field (or possibly confirmed the value already inserted there by QC1-4): should it really be possible for QC2 to change that later? | ||
+ | |||
+ | * Reasons for " | ||
+ | |||
+ | * Reasons for " | ||
+ | |||
+ | **Scheduling** | ||
+ | |||
+ | Whereas the default operation is that Qc2 shall not overwrite HQC results the need that this is ever considered shall be minimised by always having Qc2 before HQC. Even so there may be situations that new data is available and Qc2 is being rerun that Qc2 may overwrite HQC. When this case arises the rules to be followed have to specified. | ||
+ | |||
+ | Also in the case when Qc2 is delayed this may happen: | ||
+ | |||
+ | - 06 observation is missing. fmis=3 changes to fmis=1 when QC1 puts in model value, Tmod, and we get fnum=6 and fhqc=0. ftime=0 and useinfo=78947. | ||
+ | - HQC changes model value from Tmod to -1.7. fmis=1, fnum=6 (unchanged), | ||
+ | - QC2 changes " | ||
==== Space Check ==== | ==== Space Check ==== | ||
+ | In a **Space Check** an independent | ||
+ | The estimate can be considered to be a " | ||
^Controlflag Setting: |fnum=0-6 | ^Controlflag Setting: |fnum=0-6 | ||
^Condition: |As already defined for numerical model runs. |Qc2 Values For Space Check | | ^Condition: |As already defined for numerical model runs. |Qc2 Values For Space Check | | ||
^Cfailed: | Specific details of the SpaceCheck performed, e.g. type of check and interpolation method etc. || | ^Cfailed: | Specific details of the SpaceCheck performed, e.g. type of check and interpolation method etc. || | ||
- | | --oo0oo-- ||| | + | | --oo0oo-- |
|fnum=7 | Controlled. Deviation between observed value and SpaceCheck estimate higher than high test value || | |fnum=7 | Controlled. Deviation between observed value and SpaceCheck estimate higher than high test value || | ||
|fnum=8 | Controlled. Deviation between observed value and SpaceCheck estimate lower than low test value || | |fnum=8 | Controlled. Deviation between observed value and SpaceCheck estimate lower than low test value || | ||
Line 32: | Line 114: | ||
|fnum=A | Controlled. Deviation between observed value and SpaceCheck estimate lower than lowest test value || | |fnum=A | Controlled. Deviation between observed value and SpaceCheck estimate lower than lowest test value || | ||
- | ==== General Time Interpolation ==== | + | fnum [0-6] are set by [[https:// |
+ | |||
+ | **Open issues:** | ||
+ | |||
+ | - Once the SpaceCheck algorithm is validated and demonstrated to be effective shall the SpaceCheck result always take precedence over Qc1-4? | ||
+ | - Is there need to preserve the results of both Qc1-4 and Qc2-SpaceCheck | ||
+ | - Do we need to include logic to compare the results of Qc1-4 and Qc2-SpaceCheck before making final flag settings? | ||
- | ^Algorithm or Control | + | ==== Assessment of Variability ==== |
- | |Other time interpolations | + | |
- | ==== Temporal Discontinuity Check / Dip Tests and Similar | + | Another type of Space Check is to determine the variabilty in the nearest neighbour field. If the variability is high then spatial algorithms are either not applied or the confidence parameters are lowered to mark any given result or check (e.g. use ftime=2 rather than ftime=1). |
+ | |||
+ | ==== Comparison with other fields ==== | ||
+ | |||
+ | Future Qc2 checks will involve comparison with radar, satellite data etc. How will this eventuality be flagged? For weather analysis fw is available (although possibly now proposed for other uses as well) and for climatological controls (e.g. comparison with expected monthly statistics) fclim is available. | ||
+ | |||
+ | ==== Correction generated by Time (and/or Space) Interpolation ==== | ||
+ | |||
+ | ^Controlflag Setting: |ftime=1 | ||
+ | ^Condition: |The algorithm is succesful | ||
+ | ^cfailed: |Algorithm applied is recorded | ||
+ | | --oo0oo-- | ||
+ | |||
+ | General assumption is that only actually replace a missing value (be it a single point or a set of points) if there is good confidence in the corrected estimates, e.g. the time interpolation | ||
+ | ftime=2 and ftime=3 are also available for use as defined in the kvalobs original specification. | ||
+ | |||
+ | ==== Outlier detection ==== | ||
+ | |||
+ | The Space Check and Time Interpolation methods may also identify outliers, e.g. Dip test. The existing specification for controlinfo(3), | ||
+ | |||
+ | ==== Other Algorithms ==== | ||
+ | |||
+ | TBD | ||
+ | |||
+ | ==== General use of fw to log Qc2 corrections ==== | ||
+ | |||
+ | This specification is taken from Slide 3 of [[https:// | ||
+ | |||
+ | ^fw=0 |Not controlled | | ||
+ | ^fw=1 |Controlled, | ||
+ | ^fw=2 |Controlled. Slightly suspect value, not corrected (changed) | | ||
+ | ^fw=3 |Controlled. Highly suspect value, not corrected (changed) | | ||
+ | ^fw=4 |Controlled. Erronous value, not corrected (new) | | ||
+ | ^fw=5 |Controlled. Erronous value, corrected automatically (new) | | ||
+ | ^ - | - | | ||
+ | ^fw=8 |Outlier, rejected (new) | | ||
===== Turn on Qc2 in useinfo? ===== | ===== Turn on Qc2 in useinfo? ===== | ||
Line 45: | Line 167: | ||
< | < | ||
- | that is located in ... src/ | + | that is located in ... src/ |
The setUseFlags already anticipates the setting of user flags in response to QC2 controls. However, most of the logic is commented out in the operational code, as indicated below: | The setUseFlags already anticipates the setting of user flags in response to QC2 controls. However, most of the logic is commented out in the operational code, as indicated below: | ||
Line 115: | Line 237: | ||
</ | </ | ||
- | < | + | ===== Some empirical tests ===== |
- | ===== Current Algorithm SetUp ===== | + | Generate a sample Qc2 controlinfo value and observe what codes the above generates for useinfo. (Please suggest additional test cases) |
- | **RA_RR24** | + | ^Qc2 Flag or Specific Algorithm ^Controlinfo ^Resulting useinfo ^ |
+ | |RR24 Redistribution |[1000001000007000] |[5896900000000000]| | ||
+ | |RR24 Redistribution |[1140001000007000] |[5896900000000001]| | ||
+ | |ftime from TAN TAX interpolation |[1000600100000000] |[5033700000000001]| | ||
+ | |ftime |[1000600200000000] |[5033700000000001]| | ||
+ | |ftime |[1000600300000000] |[5033700000000001]| | ||
+ | |fnum |[1100700000000000] |[7000000000000001]| | ||
+ | |fnum |[1100800000000000] |[7000000000000001]| | ||
+ | |fnum |[1100900000000000] |[7000000000000001]| | ||
+ | |fnum |[1100A00000000000] |[7000000000000001]| | ||
+ | |fclim |[1111000000010000] |[5000000000000000]| | ||
+ | |fclim |[1111000000020000] |[5010500000000001]| | ||
+ | |fclim |[1111000000030000] |[5033500000000001]| | ||
+ | |fw |[1111000010000000] |[5000000000000000]| | ||
+ | |fw |[1111000020000000] |[5010500000000001]| | ||
+ | |fw |[1111000030000000] |[5033500000000001]| | ||
+ | |fw |[1111000040000000] |[5000000000000001]| | ||
+ | |fw |[1111000050000000] |[5000000000000001]| | ||
+ | |fw |[1111000080000000] |[5000000000000001]| | ||
+ | |control (no Qc2) |[1111000000000000] |[5000000000000000]| | ||
+ | |control (no Qc2) |[1111000000000000] |[5000000000000000]| | ||
+ | |control (no Qc2) |[1000001000000000] |[9899900000000000]| | ||
- | An example of the redistribution of accumulated precipitation. Where successful estimation of corrected values occurs, the controlinfo(12), | + | Furthermore, |
- | < | ||
- | BEFORE Qc2 | ||
- | |||
- | | ||
- | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+------------------------------------------- | ||
- | 53950 | 2007-12-07 06:00:00 | 9 | 110 | 2007-12-07 12:10:30 | 302 | 0 | 0 | 9 | 1140000000001000 | 7020400000000001 | QC1-2-72.b12: | ||
- | 53950 | 2007-12-08 06:00:00 | | ||
- | 53950 | 2007-12-09 06:00:00 | | ||
- | 53950 | 2007-12-10 06:00:00 | 1.5 | 110 | 2007-12-10 11:25:20 | 302 | 0 | 0 | 1.5 | 1140000000002000 | 7330900000000001 | QC1-2-72.b12: | ||
- | (4 rows) | ||
- | |||
- | AFTER Qc2 | ||
- | |||
- | kvalobs=# select * from data where stationid=53950 and obstime>' | ||
- | | ||
- | -----------+---------------------+----------+---------+---------------------+--------+--------+-------+-----------+------------------+------------------+----------------------------------------------------------------------- | ||
- | 53950 | 2007-12-07 06:00:00 | 9 | 110 | 2007-12-07 12:10:30 | 302 | 0 | 0 | 9 | 1140000000001000 | 7020400000000001 | QC1-2-72.b12: | ||
- | 53950 | 2007-12-08 06:00:00 | | ||
- | 53950 | 2007-12-09 06:00:00 | | ||
- | 53950 | 2007-12-10 06:00:00 | 1.5 | 110 | 2007-12-10 11:25:20 | 302 | 0 | 0 | 1.4 | 1140000000007000 | 5336900000000001 | QC1-2-72.b12: | ||
- | (4 rows) | ||
- | |||
- | </ | ||
- | |||
- | NOTES: | ||
- | * The operational deployed version of Qc2 will not state "Redis corrected was XX" in cfailed. This is just a convenience for ongoing testing. | ||
- | * More examples of the control- and useinfo- behaviour are available in the [[https:// | ||
- | |||
- | |||
- | **ProcessUnitT** | ||
- | |||
- | |||
- | |||
- | < | ||
- | |||
- | Sample data before Qc2 | ||
- | |||
- | 59680|2008-03-19 05: | ||
- | 59680|2008-03-19 06: | ||
- | 59680|2008-03-19 07: | ||
- | |||
- | Before turning on Qc2 flag control the algorithm would generate: | ||
- | |||
- | 59680|2008-03-19 06: | ||
- | |||
- | NB (second run before SetUseInfo updated) | ||
- | |||
- | 59680|2020-03-19 06: | ||
- | |||
- | After turning on Qc2 part of SetUseInfo: | ||
- | |||
- | 59680|2020-03-19 06: | ||
- | |||
- | |||
- | </ | ||
- | |||
- | **Discussion** (a summary of inputs from many different people, identities removed since this is the public wiki) | ||
- | |||
- | * ftime should influence useinfo(3) and useinfo(4), propose the useinfo algorithms need a complete redraft once we have an [[#Overview Qc2 Algorithms|overview of the QC2 features]]. | ||
- | |||
- | * ftime is part of the useinfo(4) requirements but needs to be checked/ | ||
- | |||
- | * ftime is not yet included in the requirements for useinfo(3). This needs to be done | ||
- | |||
- | * In this particular example fhqc=7 " | ||
- | |||
- | * Currently for the operational configuration the condition set is "DO NOT OVERWRITE A VALUE ALREADY CORRECTED BY HQC". For development/ | ||
- | |||
- | |||
- | * since HQC has put in a value in the corrected field (or possibly confirmed the value already inserted there by QC1-4): should it really be possible for QC2 to change that later? | ||
- | |||
- | * Reasons for " | ||
- | (we would have useino(3) = 4 or 2 depending on HQC was performed before or after QC2). | ||
- | |||
- | FIXME More to be added ... especially last important comments from Klima Flag experts. | ||
- | |||
- | **Scheduling** | ||
- | |||
- | Whereas the default operation is that Qc2 shall not overwrite HQC results the need that this is ever considered shall be minimised by always having Qc2 before HQC. Even so there may be situations that new data is available and Qc2 is being rerun that Qc2 may overwrite HQC. When this case arises the rules to be followed have to specified. | ||
- | |||
- | Also in the case when Qc2 is delayed this may happen: | ||
- | |||
- | - 06 observation is missing. fmis=3 changes to fmis=1 when QC1 puts in model value, Tmod, and we get fnum=6 and fhqc=0. ftime=0 and useinfo=78947. | ||
- | - HQC changes model value from Tmod to -1.7. fmis=1, fnum=6 (unchanged), | ||
- | - QC2 changes " | ||
- | |||
- | **Note** All values will be rounded to the same precision as the original data (just not implemented in example). < | ||
- | |||
- | < | ||
- | 59680 | 2020-03-19 06:00:00 | | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ... | ||
- | |||
- | FIXME | ||
- | |||
- | Also see [[https:// | ||
===== Open Issues ===== | ===== Open Issues ===== | ||
- | < | ||
- | |||
+ | - Shall src/ | ||
+ | - Use fw to record general information on Qc2 controls or keep reserved for weather analysis? See Slide 3 of [[https:// | ||
+ | - Given this overview of Qc2 control flagging is the specification for the corresponding useinfo in place ... what still needs to be done? | ||
- | [[https:// |