Skip to content

WRFDA gpsref code restructuring and diag fixes#1602

Merged
jamiebresch merged 1 commit intowrf-model:developfrom
jamiebresch:gpsref
Dec 16, 2021
Merged

WRFDA gpsref code restructuring and diag fixes#1602
jamiebresch merged 1 commit intowrf-model:developfrom
jamiebresch:gpsref

Conversation

@jamiebresch
Copy link
Contributor

@jamiebresch jamiebresch commented Dec 16, 2021

TYPE: bug fix, enhancement

KEYWORDS: WRFDA, gpsref

SOURCE: Jamie Bresch (NCAR), Wen-Jou Chen and Ying-Jhen Chen (Central Weather Bureau, Taiwan)

DESCRIPTION OF CHANGES:
Moved QC steps in da_get_innov_vector_gpsref.inc to a separate subroutine in a new file da_qc_gpsref.inc.
A few issues in the original code are fixed:

  1. keep meaningful inv for observations that failed QC
  2. add QC counts for qc_cutoff
  3. add write_iv_gpsref switch to replace hard-coded 'goto 12345' statement
  4. QC counts (exclude missing_data) are written out in qcstat_gpsref_xx
  5. fix sequence number counter in final gts_omb_oma output when gpsref is included
  6. fix occasional gpsref RH output ************ in filtered_obs.xxxx that prevents the final filtered_obs_xx from
    being generated.

Results of changes:

  1. The restructured code produces the same analysis results (wrfvar_output and statistics) as the original code.
  2. The differences are in various diagnostic output files.
  3. gpsrf entry is taken out of qcstat_conv_xx and more counts about gpsref QC are written out to
    qcstat_gpsref_xx instead.

The reasons of the change are:

  1. gpsref is not conventional ob and should not be part of 'conv' group
  2. gpsref is a height-based observation so the statistics are better done in height coordinate
  3. the counts grouped in pressure levels in original qcstat_conv_xx for gpsrf appear to be incorrect

A sample qcstat_gpsref_01

Quality Control Statistics for GPSRO Refractivity

                      TOTAL    500   1000   1500   2000   3000   5000   6000   7000   8000  10000  12000  15000  18000 >18000 meter
 ntotal           =     882      9     14     19     19     46     93     45     45     45     92     92    137    137     89
 ngood            =     787      4      4      7      7     26     72     42     42     45     92     92    128    137     89
 nrej_height      =       0      0      0      0      0      0      0      0      0      0      0      0      0      0      0
 nrej_allqc       =      95      5     10     12     12     20     21      3      3      0      0      0      9      0      0

 nrej_maxiv       =       9
 nrej_dndz        =      14
 nrej_dndz2       =       5
 nrej_pcnt_below  =      24
 nrej_pcnt_middle =       0
 nrej_pcnt_above  =       0
 nrej_cutoff      =      73

New namelist variables have more flexibility for testing the QC impact with the default values matching the original
code:

&OBS_OPT
WRITE_IV_GPSREF        = .false. ! switch to write out RO_Innov_ files
GPSREF_QC_DNDZ_OPT     = 1       ! 0: off, 1: on (default)
GPSREF_QC_DNDZ2_OPT    = 1       ! 0: off, 1: on (default)
GPSREF_QC_DNDZ_THRESH  = -50.0
GPSREF_QC_DNDZ2_THRESH = 100.0
GPSREF_QC_GSI_OPT      = 1       ! 0: off, 1: on (default)
GPSREF_QC_PCNT_OPT     = 1       ! 0: off, 1: on (default)
GPSREF_QC_PCNT_H1      = 7000.0
GPSREF_QC_PCNT_H2      = 25000.0
GPSREF_QC_PCNT_BELOW   = 0.05
GPSREF_QC_PCNT_MIDDLE  = 0.04
GPSREF_QC_PCNT_ABOVE   = 0.10 /

LIST OF MODIFIED FILES:
M Registry/registry.var
M var/build/depend.txt
M var/da/da_control/da_control.f90
M var/da/da_gpsref/da_check_max_iv_gpsref.inc
M var/da/da_gpsref/da_get_innov_vector_gpsref.inc
A var/da/da_gpsref/da_get_innov_vector_gpsref_deprecated.inc
M var/da/da_gpsref/da_gpsref.f90
A var/da/da_gpsref/da_qc_gpsref.inc
M var/da/da_minimisation/da_get_innov_vector.inc
M var/da/da_obs_io/da_read_omb_tmp.inc
M var/da/da_obs_io/da_write_filtered_obs.inc

TESTS CONDUCTED:

  1. the code has been used operationally for a quite while
  2. Jenkins tests all passed

RELEASE NOTE: WRFDA gpsref code has been restructured to moved QC steps in da_get_innov_vector_gpsref.inc to a separate subroutine in a new file da_qc_gpsref.inc. New namelist variables are added to have more flexibility for testing gpsref QC impact. Several issues with gpsref diagnostic output have been fixed and qcstat info for gpsref is now in new qcstat_gpsref_xx.

@jamiebresch
Copy link
Contributor Author

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: 5cbfe3f, requested by: jamiebresch for PR: https://github.com/scala-computing/WRF/pull/1602. For any query please send e-mail to David Gill.

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           58
Number of Simulations  : 159           155        0
Number of Comparisons  : 96           93        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@davegill
Copy link
Contributor

@jamiebresch
Jamie,
Since we now require two approvals, ping Jake. Once he approves, we will give you the second approval right away.

@davegill davegill self-requested a review December 16, 2021 20:15
@davegill
Copy link
Contributor

@jamiebresch
Jamie,
Make sure that I did not destroy your commit message with all of my various 1, 2, 3 stuff.

@jamiebresch jamiebresch merged commit 615e934 into wrf-model:develop Dec 16, 2021
@jamiebresch jamiebresch deleted the gpsref branch December 16, 2021 20:36
vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE: bug fix, enhancement

KEYWORDS: WRFDA, gpsref

SOURCE: Jamie Bresch (NCAR), Wen-Jou Chen and Ying-Jhen Chen (Central Weather Bureau, Taiwan)

DESCRIPTION OF CHANGES:
Moved QC steps in da_get_innov_vector_gpsref.inc to a separate subroutine in a new file da_qc_gpsref.inc.
A few issues in the original code are fixed:
1. keep meaningful inv for observations that failed QC
2. add QC counts for qc_cutoff
3. add write_iv_gpsref switch to replace hard-coded 'goto 12345' statement
4. QC counts (exclude missing_data) are written out in qcstat_gpsref_xx
5. fix sequence number counter in final gts_omb_oma output when gpsref is included
6. fix occasional gpsref RH output `************` in filtered_obs.xxxx that prevents the final filtered_obs_xx from 
being generated.

Results of changes:
1. The restructured code produces the same analysis results (wrfvar_output and statistics) as the original code.
2. The differences are in various diagnostic output files.
3. gpsrf entry is taken out of qcstat_conv_xx and more counts about gpsref QC are written out to 
qcstat_gpsref_xx instead.

The reasons of the change are:
1. gpsref is not conventional ob and should not be part of 'conv' group
2. gpsref is a height-based observation so the statistics are better done in height coordinate
3. the counts grouped in pressure levels in original qcstat_conv_xx for gpsrf appear to be incorrect

A sample qcstat_gpsref_01
```
Quality Control Statistics for GPSRO Refractivity

                      TOTAL    500   1000   1500   2000   3000   5000   6000   7000   8000  10000  12000  15000  18000 >18000 meter
 ntotal           =     882      9     14     19     19     46     93     45     45     45     92     92    137    137     89
 ngood            =     787      4      4      7      7     26     72     42     42     45     92     92    128    137     89
 nrej_height      =       0      0      0      0      0      0      0      0      0      0      0      0      0      0      0
 nrej_allqc       =      95      5     10     12     12     20     21      3      3      0      0      0      9      0      0

 nrej_maxiv       =       9
 nrej_dndz        =      14
 nrej_dndz2       =       5
 nrej_pcnt_below  =      24
 nrej_pcnt_middle =       0
 nrej_pcnt_above  =       0
 nrej_cutoff      =      73
```
New namelist variables have more flexibility for testing the QC impact with the default values matching the original 
code:
```
&OBS_OPT
WRITE_IV_GPSREF        = .false. ! switch to write out RO_Innov_ files
GPSREF_QC_DNDZ_OPT     = 1       ! 0: off, 1: on (default)
GPSREF_QC_DNDZ2_OPT    = 1       ! 0: off, 1: on (default)
GPSREF_QC_DNDZ_THRESH  = -50.0
GPSREF_QC_DNDZ2_THRESH = 100.0
GPSREF_QC_GSI_OPT      = 1       ! 0: off, 1: on (default)
GPSREF_QC_PCNT_OPT     = 1       ! 0: off, 1: on (default)
GPSREF_QC_PCNT_H1      = 7000.0
GPSREF_QC_PCNT_H2      = 25000.0
GPSREF_QC_PCNT_BELOW   = 0.05
GPSREF_QC_PCNT_MIDDLE  = 0.04
GPSREF_QC_PCNT_ABOVE   = 0.10 /
```
LIST OF MODIFIED FILES:
M       Registry/registry.var
M       var/build/depend.txt
M       var/da/da_control/da_control.f90
M       var/da/da_gpsref/da_check_max_iv_gpsref.inc
M       var/da/da_gpsref/da_get_innov_vector_gpsref.inc
A       var/da/da_gpsref/da_get_innov_vector_gpsref_deprecated.inc
M       var/da/da_gpsref/da_gpsref.f90
A       var/da/da_gpsref/da_qc_gpsref.inc
M       var/da/da_minimisation/da_get_innov_vector.inc
M       var/da/da_obs_io/da_read_omb_tmp.inc
M       var/da/da_obs_io/da_write_filtered_obs.inc

TESTS CONDUCTED:
1. the code has been used operationally for a quite while
2. Jenkins tests all passed

RELEASE NOTE: WRFDA gpsref code has been restructured to moved QC steps in da_get_innov_vector_gpsref.inc to a separate subroutine in a new file da_qc_gpsref.inc. New namelist variables are added to have more flexibility for testing gpsref QC impact. Several issues with gpsref diagnostic output have been fixed and qcstat info for gpsref is now in new qcstat_gpsref_xx.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants