da_check_max_iv_bogus.inc

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