wrf svn trunk commit r4103
[wrffire.git] / wrfv2_fire / var / da / da_ssmi / da_check_max_iv_ssmt2.inc
blob604803859f9370fb1846f8ed1b549b01eaa417ed
1 subroutine da_check_max_iv_ssmt2(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 iteration
14    integer,       intent(inout) :: num_qcstat_conv(:,:,:,:)
17    integer :: k,n, ipr
18    logical :: failed
20    if (trace_use_dull) call da_trace_entry("da_check_max_iv_ssmt2")
23    !---------------------------------------------------------------------------
24    !  [1.0] Perform maximum innovation vector check:
25    !---------------------------------------------------------------------------
27    do n=iv%info(ssmt2)%n1,iv%info(ssmt2)%n2
28       do k = 1, iv%info(ssmt2)%levels(n)
29         call da_get_print_lvl(iv%ssmt2(n)%p(k),ipr)
31         failed = .false.
32         if ( iv%ssmt2(n)%rh(k)%qc >= obs_qc_pointer )  &  
33            call da_max_error_qc (it, iv%info(ssmt2), n, iv%ssmt2(n)%rh(k), max_error_q, failed)
34         if ( iv%info(ssmt2)%proc_domain(k,n) ) then
35            num_qcstat_conv(1,ssmt2,4,ipr) = num_qcstat_conv(1,ssmt2,4,ipr) + 1
36            if (failed) then
37               num_qcstat_conv(2,ssmt2,4,ipr) = num_qcstat_conv(2,ssmt2,4,ipr) + 1
38               write(qcstat_conv_unit,'(2x,a10,2x,a4,3f12.2)')&
39                    'ssmt2',ob_vars(4),iv%info(ssmt2)%lat(k,n),iv%info(ssmt2)%lon(k,n),0.01*iv%ssmt2(n)%p(k)
40            endif
41         endif
42       end do
43    end do
45    if (trace_use_dull) call da_trace_exit("da_check_max_iv_ssmt2")
47 end subroutine da_check_max_iv_ssmt2