Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / da / da_ssmi / da_check_max_iv_ssmi_rv.inc
blob2f3ab549b970eb70821ed49c698f0971e9f7c7d4
1 subroutine da_check_max_iv_ssmi_rv(iv, it, num_qcstat_conv)              
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    ! Update:
6    !    Removed Outerloop check as it is done in da_get_innov
7    !    Author: Syed RH Rizvi,  MMM/NESL/NCAR,  Date: 07/12/2009
8    !-----------------------------------------------------------------------
10    implicit none
12    type(iv_type), intent(inout) :: iv
13    integer,       intent(in)    :: it ! Outer loop 
14    integer,       intent(inout) :: num_qcstat_conv(:,:,:,:)
16    logical :: failed
17    integer :: n
18    
19    if (trace_use) call da_trace_entry("da_check_max_iv_ssmi_rv")
21    !---------------------------------------------------------------------------
22    ! [1.0] Perform maximum innovation vector check:
23    !---------------------------------------------------------------------------
25    do n=iv%info(ssmi_rv)%n1,iv%info(ssmi_rv)%n2
27       failed=.false.
28       if( iv%ssmi_rv(n)%tpw%qc >= obs_qc_pointer ) then 
29       call da_max_error_qc (it, iv%info(ssmi_rv), n, iv%ssmi_rv(n)%tpw, max_error_pw, failed)
30       if( iv%info(ssmi_rv)%proc_domain(1,n) ) then
31                  num_qcstat_conv(1,ssmi_rv,7,1) = num_qcstat_conv(1,ssmi_rv,7,1) + 1
32       if(failed) then
33         num_qcstat_conv(2,ssmi_rv,7,1) = num_qcstat_conv(2,ssmi_rv,7,1) + 1
34         if ( write_rej_obs_conv ) then
35         write(qcstat_conv_unit,'(2x,a10,2x,a4,2f12.2,a12)')&
36         'ssmi_rv',ob_vars(7),iv%info(ssmi_rv)%lat(1,n),iv%info(ssmi_rv)%lon(1,n),'1013.25'                  
37         end if
38       end if
39       end if
40       end if
42       failed=.false.
43       if( iv%ssmi_rv(n)%speed%qc >= obs_qc_pointer ) then
44       call da_max_error_qc (it, iv%info(ssmi_rv), n, iv%ssmi_rv(n)%speed, max_error_uv, failed)
45       if( iv%info(ssmi_rv)%proc_domain(1,n) ) then
46                  num_qcstat_conv(1,ssmi_rv,6,1) = num_qcstat_conv(1,ssmi_rv,6,1) + 1
47       if(failed)then
48          num_qcstat_conv(2,ssmi_rv,6,1) = num_qcstat_conv(2,ssmi_rv,6,1) + 1
49         if ( write_rej_obs_conv ) then
50         write(qcstat_conv_unit,'(2x,a10,2x,a4,2f12.2,a12)')&
51         'ssmi_rv',ob_vars(6),iv%info(ssmi_rv)%lat(1,n),iv%info(ssmi_rv)%lon(1,n),'1013.25'                  
52         endif
53       endif
54       end if
55       end if
57    end do
59    if (trace_use) call da_trace_exit("da_check_max_iv_ssmi_rv")
61 end subroutine da_check_max_iv_ssmi_rv