Qc2 Flag Specification

DRAFT

For flagging spatial analysis of the available observation data.

Controlflag Setting Description
fw=0 Ikke kontrollert
fw=1 Kontrollert. Funnet i orden
fw=2 Kontrollert. Observert verdis avvik fra beregnet verdi er større enn høy testverdi
fw=3 Kontrollert. Observert verdis avvik fra beregnet verdi er mindre enn lav testverdi
fw=4 Kontrollert. Observert verdis avvik fra beregnet verdi er større enn høyeste testverdi
fw=5 Kontrollert. Observert verdis avvik fra beregnet verdi er mindre enn laveste testverdi
fw=6 Original verdi mangler eller er forkastet av en annen QC2-kontroll. Interpolert/korrigert med beregnet verdi

(fw=7 Vi vil vurdere om interpolasjonsmetodikken (fw-kontrollen) selv kan forkaste en verdi. Foreløpig er vi litt tvilende til det, men holder muligheten åpen.)

The beregnet verdi/calculated value is the model value provided by th Qc2 algorithm used. The algorithm used is recorded in the “cfailed” string.

FIXME … To do: parse all flag group responses and document.

Observation

Under https://kvalobs.wiki.met.no/doku.php?id=kvoss:system:qc2:flag:regression there are a lot of observations where useinfo(7) has been changed from a positive value (3 or 4 - observasjon er meldt for tidlig/sent) into 0.

Analysis

Assumed that some kind of resetting of useinfo flags has occurred before running “setUseFlags(const kvControlInfo& cinfo) with the existing Qc2 logic turned on”? If so, useinfo(7)=3,4 should not be reset, because the only place where these values are set is when decoding the original message (the values are set by the decoder).

The only values for useinfo(7) in the Kvalobs database are 0, 3 and 4.

Confirmation

Yes … the input to setUseFlags in the tests was the value of the controlinfo in order to see what useinfo was generated without any prior initialisation of the useinfo.

Next Step

Rerun the regression tests with initialised valid useinfo … and then compare the results with previous data.

Regarding the setUseFlags anticipation of the setting of user flags in response to QC2 controls, most of the logic is commented out in the operational code, as indicated below:

bool kvControlInfo::qc2dDone() const
{
   return false;//flag( f_fs ) or flag( f_ftime ) or flag( f_fw ) or
flag( f_fstat );
}

...

bool kvControlInfo::qc2mDone() const
{
   return false;//flag( f_fclim ) or flag( f_fd );
}
"

Additional Code Change Required

An additional change is to alter the check for flag f_fs being set into checking for the specific values of f_s which QC2 alone is able to set. fs=1,2,3 should not imply qc2dDone=true, because fs=1,2,3 is set by QC1, not QC2. Similarly for the flag f_fd in qc2mDone.

The Flaggdokumentet update with the new values for fw implies changes in setting of useinfo(2) also and will therefore take place after the implementation of 1272 that also involves useinfo(2).

… fw flags will satisfy our need for flagging spatial analysis of the available observation data. Here are the not yet official explanation of the flags:

fw=0 Ikke kontrollert fw=1 Kontrollert. Funnet i orden fw=2 Kontrollert. Observert verdis avvik fra beregnet verdi er større enn høy testverdi fw=3 Kontrollert. Observert verdis avvik fra beregnet verdi er mindre enn lav testverdi fw=4 Kontrollert. Observert verdis avvik fra beregnet verdi er større enn høyeste testverdi fw=5 Kontrollert. Observert verdis avvik fra beregnet verdi er mindre enn laveste testverdi fw=6 Original verdi mangler eller er forkastet av en annen QC2-kontroll. Interpolert/korrigert med beregnet verdi

(fw=7 Vi vil vurdere om interpolasjonsmetodikken (fw-kontrollen) selv kan forkaste en verdi. Foreløpig er vi litt tvilende til det, men holder muligheten åpen.)

With “beregnet verdi” we mean the spatial QC2 interpolation method you are developing. We didn't discuss the future but I think that a more sophisticated algorithm in the future with radar/satellite/PROFF information should be able to use the same fw flags. But the test values for setting the flags may be different.

Comments to the results presented in the mail below.

I comment only useinfo(0-4). Concerning u.info(0) I interpret “Ikke hele QC2” as “Ikke alle eksisterende QC2-kontroller”. As existing QC2 checks we can define fs=5-A (QC2d-1), ftime=0-3 (QC2d-2), fw=0-6 (QC2d-3) and fd=7-B (QC2m-2), but this last one is not a QC2m, but rather a QC2d. I propose to skip fstat=0-2 (QC2d-4) and fclim=0-3 (QC2m-1), because these checks will take a lot of time to implement. I think those will be postponed until the other are implemented and work well. With “QC1 er gjennomført” I understand this as “Minst en QC1-kontroll gjennomført”.

Concerning u.info(4) it is possible to interpret spatial QC2 interpolation as “5: Romkontroll, basert på observasjonsdata”. I prefer this instead of “7: Romkontroll, basert på modelldata”. “6: Romkontroll, basert på tidsserier” means e.g. Akima interpolation method, which utilize neighbour time series. If interpolation from the candidate timeseries alone, it is better with “4: Konsistenskontroll i forhold til tidligere/senere observasjonsterminer (mer enn én parameter).

For me it should be reasonable to do the flagging like this:

  • 1. RR24. We have no QC1, only QC2 (fd=7). Then u.info(0)=6. I prefer u.info(4)=5. u.info=68965.
  • 2. RR24. We have QC1 (fr=1, fcc=4) and QC2 (fd=7). u.info=58965.
  • 3. ftime (TAN/TAX). We have no QC1. fr=6 indicates that original is rejected (and corrected), but this must be due to inconsistence discovered and corrected in QC2 (ftime=1). With this new fw-flag we should have had c.info=1000000160000000 and u.info=60334.
  • 4. ftime. Corresponding to 3. c.info=1000000260000000 and u.info=60334.
  • 5. ftime. This time ftime=3 (ikke korrigert pga uegnet metode). I interpret this as “original value rejected”. c.info=1000002300000000 and u.info=60389. If original value is kept uncorrected, we have c.info=1000000300000000 and u.info=60309.
  • 6. This is fnum, not ftime.
  • I skip all fnum, because we have chosen fw. I skip all fclim (see above).
  • 13. fw. We have QC1 and QC2 (fw=1). Then u.info is OK.
  • 14. fw. We have QC1 and QC2 (fw=2). Then u.info is OK.
  • 15. fw. We have QC1 and QC2 (fw=3). Then u.info=50105.
  • 16. fw. We have QC1 and QC2 (fw=4). Then u.info=50205.
  • 17. fw. We have QC1 and QC2 (fw=5). Then u.info=50205.
  • 18. fw. We have QC1 and QC2, but fw=8 is not defined.
  • 19. No QC2. We have QC1. Then u.info=70000
  • 20. No QC2. We have QC1. Then u.info=70000
  • 21. No QC2. We have no QC1. Original value is missing. Then u.info is OK.

And then to your email of 3 February.

  • 1. fcp=3 which means “Originalverdi svært mistenkelig). fhqc=1 (OK) Then u.info is OK.
  • 2. We have QC1 (fpre=6). fmis=2 (original value rejected). Then u.info=7?38900?00000XX1.

It may happen that u.info(1)=1 but I don't know if this is usual in combination with fpre=6. If correct it is difficult to decide if u.info(7)=4 or 3 or another value. I understand that with QC2 on u.info(7) becomes like 0, which may be OK in real life?

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • kvalobs/kvoss/system/qc2/flag/specification.txt
  • Last modified: 2022-05-31 09:29:32
  • (external edit)