Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
kvalobs:kvoss:system:qc2:flag:analysis [2010-01-17 01:12:23]
paule
kvalobs:kvoss:system:qc2:flag:analysis [2022-05-31 09:29:32] (current)
Line 3: Line 3:
 Note: a number of Qc2 useinfo changes are coded in lib/kvalobs/kvDataFlag.cc but are all commented out and inactive. For development and reflectedin the examples provided below, the Qc2 items are all turned on. Please see [[#Turn on Qc2 in useinfo?|below]] for details. Note: a number of Qc2 useinfo changes are coded in lib/kvalobs/kvDataFlag.cc but are all commented out and inactive. For development and reflectedin the examples provided below, the Qc2 items are all turned on. Please see [[#Turn on Qc2 in useinfo?|below]] for details.
  
-===== Exisiting Specification =====+===== 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: 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:
Line 9: Line 9:
   * [[https://kvalobs.wiki.met.no/lib/exe/fetch.php?id=kvoss%3Asystem%3Aqc2%3Arequirements&cache=cache&media=kvoss:system:qc2:flags_in_qc2.ppt|Flags in Qc2]]   * [[https://kvalobs.wiki.met.no/lib/exe/fetch.php?id=kvoss%3Asystem%3Aqc2%3Arequirements&cache=cache&media=kvoss:system:qc2:flags_in_qc2.ppt|Flags in Qc2]]
  
-==== Redistirbution of Accumulated Values ====+==== Redistribution of Accumulated Values ====
  
 ^Controlflag Setting: |fd=7    | ^Controlflag Setting: |fd=7    |
-^Condition: |The algorithm is considered successful |+^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, but such information can also always be kept in cfailed.) |
  
 **Examples** **Examples**
Line 49: Line 50:
  
 ==== 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 successful |+^Condition: |The algorithm is successful |
 ^Cfailed: |Algorithm method recorded.  | ^Cfailed: |Algorithm method recorded.  |
  
Line 70: Line 73:
 **Discussion** (a summary of inputs from many different people, identities removed since this is the public wiki) **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 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/tested   * ftime is part of the useinfo(4) requirements but needs to be checked/tested
Line 76: Line 79:
   * ftime is not yet included in the requirements for useinfo(3). This needs to be done   * ftime is not yet included in the requirements for useinfo(3). This needs to be done
  
-  * In this particular example fhqc=7 "Korrigert manuelt" which must is a bug, since original value is missing (fhqc=5: "Interpolert manuelt" might have been an appropriate setting). So the misleading value useinfo(3)=1: "Original verdi er manuelt korrigert" is because of this mistake in fhqc.+  * In this particular example fhqc=7 "Korrigert manuelt" which must be a bug, since original value is missing (fhqc=5: "Interpolert manuelt" might have been an appropriate setting). So the misleading value useinfo(3)=1: "Original verdi er manuelt korrigert" is because of this mistake in fhqc.
  
   * Currently for the operational configuration the condition set is "DO NOT OVERWRITE A VALUE ALREADY CORRECTED BY HQC". For development/testing this condition is sometimes relaxed.   * Currently for the operational configuration the condition set is "DO NOT OVERWRITE A VALUE ALREADY CORRECTED BY HQC". For development/testing this condition is sometimes relaxed.
Line 83: Line 86:
  
   * Reasons for "no" include: that elsewhere setting up the criteria for useinfo(3) will be that much harder - it is no longer enough to check controlinfo, we also need to know which control was performed last (we would have useino(3) = 4 or 2 depending on HQC was performed before or after QC2).   * Reasons for "no" include: that elsewhere setting up the criteria for useinfo(3) will be that much harder - it is no longer enough to check controlinfo, we also need to know which control was performed last (we would have useino(3) = 4 or 2 depending on HQC was performed before or after QC2).
 +
 +  * Reasons for "yes": QC2 is objective and may be preferred to the subjective HQC, to get uniform results. At least some of the algorithms could be set up to overwrite the HQC results. Redistribution of accumulated precipitation is one of the candidates - at least for "old" data in Histkvalobs.
  
 **Scheduling** **Scheduling**
Line 96: Line 101:
 ==== Space Check ==== ==== Space Check ====
  
 +In a **Space Check** an independent  estimate of a parameter measured at a station is derived from a set of neighbouring values. Comparison with the estimate is used to assign a confidence level to the original parameter observation.
  
 +The estimate can be considered to be a "model" value and therefore the higher setting  of the fnum controlflag (7-A) may be used to indicate the performance of this quality control. If the Space Check result is that there is agreement between the observed measurement and the model value then fnum is set to 1 as usual.
  
 ^Controlflag Setting: |fnum=0-6   |fnum=7-A | ^Controlflag Setting: |fnum=0-6   |fnum=7-A |
Line 107: 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://kvalobs.wiki.met.no/doku.php?id=kvalobs:qc14|Qc1-4]] based on comparison with numerical model values. Qc1-4 will run before the Qc2-SpaceCheck. 
  
-^Algorithm or Control  ^Expected Control flags to change  ^Condition   ^Cfailed Change +**Open issues:**
-|Other time interpolations   | ftime=1 | NB only corrected updated if algorithm considered successful | Algorithm method recorded. |+
  
-==== Temporal Discontinuity Check / Dip Tests and Similar ====+  - 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? 
 + 
 +==== Assessment of Variability ==== 
 + 
 +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 and spatial interpolation agree. 
 +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), fs can capture such events from Qc2 checks. 
 + 
 +==== Other Algorithms ==== 
 + 
 +TBD 
 + 
 +==== General use of fw to log Qc2 corrections ==== 
 + 
 +This specification is taken from Slide 3 of  [[https://kvalobs.wiki.met.no/lib/exe/fetch.php?id=kvoss%3Asystem%3Aqc2%3Arequirements&cache=cache&media=kvoss:system:qc2:flags_in_qc2.ppt| Flags in Qc2]]. 
 + 
 +^fw=0 |Not controlled | 
 +^fw=1 |Controlled, found OK | 
 +^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 190: Line 237:
 </code> </code>
  
 +===== Some empirical tests =====
  
 +Generate a sample Qc2 controlinfo value and observe what codes the above generates for useinfo. (Please suggest additional test cases)
  
 +^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]|
  
 +Furthermore, here is an example of [[kvoss::system::qc2::flag::regression|Qc1 Regression tests]].
  
-===== Open Issues ===== 
- 
-  - Shall src/lib/kvalobs/Qc2_kvDataFlag.cc be updated to include the Qc2 elements. This is part of the standard Qc1 software and this change would therefore require regression testing. Who is reposnsible for this decision and to carry out the Qc1 regression testing? 
  
  
 +===== Open Issues =====
  
 +  - Shall src/lib/kvalobs/Qc2_kvDataFlag.cc be updated to include the Qc2 elements. This is part of the standard Qc1 software and this change would therefore require regression testing. Who is reposnsible for this decision and to carry out the Qc1 regression testing? (//may be these results of some preliminary [[kvoss:system:qc2:flag:regression|regression tests]] are sufficient?// :-) Please comment! :-)
 +  - Use fw to record general information on Qc2 controls or keep reserved for weather analysis? See Slide 3 of  [[https://kvalobs.wiki.met.no/lib/exe/fetch.php?id=kvoss%3Asystem%3Aqc2%3Arequirements&cache=cache&media=kvoss:system:qc2:flags_in_qc2.ppt| Flags in Qc2]].
 +  - Given this overview of Qc2 control flagging is the specification for the corresponding useinfo in place ... what still needs to be done?
  
-N.B. [[https://kvalobs.wiki.met.no/doku.php?id=kvalobs:kvalobs-flagg#kontrollflaggene|controlflags]] 
  • kvalobs/kvoss/system/qc2/flag/analysis.1263690743.txt.gz
  • Last modified: 2022-05-31 09:23:18
  • (external edit)