[Dart-users] proposed change to obs_diag

Tim Hoar thoar at ucar.edu
Wed Jun 10 13:44:45 MDT 2020


First ... let me start off by saying obs_diag.f90 is the bane of my
existence.

There is a bug that involves the rare situation when the prior observation
is rejected by the outlier threshold and the posterior forward operator
fails.
DART does not have an error code that covers that situation. The obs_diag
program correctly records the prior observation rejection as a DART QC of 7,
if the posterior forward operator failed, the obs_diag program
(incorrectly) assigned the posterior QC to  DART QC of 4. The correct error
code for a
failed posterior forward operator is 2, not 4. Worse, the logic to check
for a failed posterior forward operator when the prior was rejected was not
implemented correctly in all parts of the code. * Let me repeat that the
statistics for the priors are and have been correct.* Only in rare
situations
were the posterior statistics incorrect. Since we all know that posterior
statistics are not the best metric to begin with, I hope this has not caused
you any problems.

Even before 2015, the run-time output and log messages of obs_diag report
on the number of observations in this situation - see the bold text below:

 # observations used  :         9600

 Count summary over all regions - obs may count for multiple regions:

 # identity           :            0

 # bad Innov  (ratio) :            0

 # bad UV (wind pairs):            0

 # bad Level          :            0

 # big (original) QC  :            0

 # bad DART QC prior  :            0

 # bad DART QC post   :            0

* # priorQC 7 postQC 4 :            0*

I am in the process of correcting the logic. Stay tuned for a GitHub pull
request to address the issue.

It also seems like the right time to do some code maintenance (in a
separate pull request), and I need advice on how far I can take this.
There is legacy code that predates the implementation of the DART QC, so
some statistics are still being calculated that are more accurately
reflected in the DART QC codes.

I would like to stop calculating - and then remove from the
obs_diag_output.nc, the calculation of the following metrics that are in
bold text:

 CopyMetaData =

  "Nposs                           ",

  "Nused                           ",

  "*NbigQC*                          ",

  "*NbadIZ*                          ",

  "NbadUV                          ",

  "NbadLV                          ",

  "rmse                            ",

  "bias                            ",

  "spread                          ",

  "totalspread                     ",

  "*NbadDARTQC*                      ",

  "observation                     ",

  "ens_mean                        ",

  "N_trusted                       ",

  "N_DARTqc_0                      ",

  "N_DARTqc_1                      ",

  "N_DARTqc_2                      ",

  "N_DARTqc_3                      ",

  "N_DARTqc_4                      ",

  "N_DARTqc_5                      ",

  "N_DARTqc_6                      ",

  "N_DARTqc_7                      ",

  "N_DARTqc_8                      " ;

}

This will change the number of 'copies' in the obs_diag_output.nc file. If
you have your own routines that rely on reading the obs_diag_output.nc,
be aware that the index for the quantity you want is free to change.
Determining the copy index from the CopyMetaData variable is the correct
way to go.


char CopyMetaData(*copy*, stringlength) ;

CopyMetaData:long_name = "quantity names" ;

...

float RADIOSONDE_U_WIND_COMPONENT_guess(time, *copy*, mlevel, region) ;



*Does anyone object to me removing 'NbigQC', 'NbigIZ', and 'NbadDARTQC'
from the obs_diag output?*

*Naturally, I will ensure that the DART Matlab diagnostics will be
compatible.*

Thanks -- Tim

Tim Hoar
Data Assimilation Research Section
National Center for Atmospheric Research
thoar at ucar.edu
303.497.1708
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/dart-users/attachments/20200610/b8bb493a/attachment.html>


More information about the Dart-users mailing list