da_check_max_iv_bogus.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_bogus(iv, it,itu,ituf,itvv,itvvf, itt,ittf,itqv,itqvf,itslp,itslpf)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    type(iv_type), intent(inout) :: iv
10    integer,       intent(in)    :: it      ! Outer iteration
11    integer,       intent(inout) :: itu,ituf,itvv,itvvf,itslp,itslpf,&
12                                        itt,ittf,itqv,itqvf
13 
14    integer :: k,n
15    logical :: failed
16    
17    if (trace_use_dull) call da_trace_entry("da_check_max_iv_bogus")
18 
19    !---------------------------------------------------------------------------
20    ! [1.0] Open diagnostic file:
21    !---------------------------------------------------------------------------
22 
23    if (rootproc .and. check_max_iv_print) then
24       write (check_max_iv_unit,'(A)')  &
25         '----------------------------------------------------------------'
26       write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
27       write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))')  &
28         'Error max test ratio for Bogus_U   = ',max_error_buv, &
29         'Error max test ratio for Bogus_V   = ',max_error_buv, &
30         'Error max test ratio for Bogus_T   = ',max_error_bt , &
31         'Error max test ratio for Bogus_QV  = ',max_error_bq , &
32         'Error max test ratio for Bogus_SLP = ',max_error_slp  
33    end if
34 
35    !---------------------------------------------------------------------------
36    ! [2.0] Perform maximum innovation vector check:
37    !---------------------------------------------------------------------------
38 
39    failed = .false.
40 
41    do n = iv%info(bogus)%n1,iv%info(bogus)%n2
42       do k = 1, iv%info(bogus)%levels(n)
43          ! U-wind
44          call da_max_error_qc(it, iv%info(bogus), n, iv%bogus(n)%u(k), max_error_buv, itu, ituf, &
45             check_max_iv_unit, 'U    ', failed, check_max_iv_print)
46          ! V-wind
47          call da_max_error_qc(it, iv%info(bogus), n, iv%bogus(n)%v(k), max_error_buv, itvv, itvvf, &
48             check_max_iv_unit, 'V    ', failed, check_max_iv_print)                           
49          ! Temperature
50          call da_max_error_qc(it, iv%info(bogus), n, iv%bogus(n)%t(k), max_error_bt, itt, ittf, &
51             check_max_iv_unit, 'TEMP ', failed, check_max_iv_print)                           
52          ! Mixing ratio, same ratio as relative humidity
53          call da_max_error_qc(it, iv%info(bogus), n, iv%bogus(n)%q(k), max_error_bq, itqv, itqvf, &
54             check_max_iv_unit, 'QV   ', failed, check_max_iv_print)               
55       end do 
56 
57       ! Sea Level Pressure
58 
59       call da_max_error_qc(it, iv%info(bogus), n, iv%bogus(n)%slp, max_error_slp, itslp, itslpf,check_max_iv_unit,  &
60          'SLP  ', failed, check_max_iv_print)           
61    end do
62    
63    if (trace_use_dull) call da_trace_exit("da_check_max_iv_bogus")
64 
65 end subroutine da_check_max_iv_bogus
66 
67