Skip to content

Commit

Permalink
Fix improper DA qc flag when synop q ob is missing for q_error_option…
Browse files Browse the repository at this point in the history
…s=2 (wrf-model#466)

TYPE: bug fix

KEYWORDS: WRFDA, gts_omb_oma, synop, q_error_options=2, qc flag

SOURCE: Problem reported by Central Weather Bureau, Taiwan

DESCRIPTION OF CHANGES:

Add checks for missing Q obs to set proper Q qc flags.

LIST OF MODIFIED FILES:
M var/da/da_synop/da_get_innov_vector_synop.inc

TESTS CONDUCTED:
CWB confirmed the changes fixed the problems.
  • Loading branch information
jamiebresch authored Apr 27, 2018
1 parent 5cace24 commit 3c1d12a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions var/da/da_synop/da_get_innov_vector_synop.inc
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,14 @@ subroutine da_get_innov_vector_synop( it,num_qcstat_conv, grid, ob, iv)
if ( it == 1 .and. q_error_options == 2 ) then
allocate (model_qs(iv%info(synop)%n1:iv%info(synop)%n2))
do n=iv%info(synop)%n1,iv%info(synop)%n2
call da_tp_to_qs(model_t(1,n), model_p(1,n), es, model_qs(n))
rh_error = iv%synop(n)%q%error !q error is rh at this stage
iv%synop(n)%q%error = model_qs(n)*rh_error*0.01
if ( abs(ob%synop(n)%q-missing_r) > 1.0 ) then
call da_tp_to_qs(model_t(1,n), model_p(1,n), es, model_qs(n))
rh_error = iv%synop(n)%q%error !q error is rh at this stage
iv%synop(n)%q%error = model_qs(n)*rh_error*0.01
else
iv%synop(n)%q%error = missing_r
iv%synop(n)%q%qc = missing_data
end if
end do
deallocate (model_qs)
end if
Expand Down

0 comments on commit 3c1d12a

Please sign in to comment.