da_check_max_iv_radar.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_radar(iv, it, irv, irf, irvf, irff)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    type(iv_type), intent(inout) :: iv
10    integer,       intent(in)    :: it    
11    integer,       intent(inout) :: irv, irf, irvf, irff    
12 
13    integer :: k,n
14    logical :: failed 
15 
16    if (trace_use) call da_trace_entry("da_check_max_iv_radar")
17 
18    !---------------------------------------------------------------------------
19    ! [1.0] Open diagnostic file:
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 
27       write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))')  &
28          'Error max test ratio for radar_rv   = ',max_error_rv, &
29          'Error max test ratio for radar_rf   = ',max_error_rf
30    end if
31 
32    !------------------------------------------------------------------------
33    ! [2.0] Perform maximum innovation vector check:
34    !------------------------------------------------------------------------
35 
36    failed = .false.
37 
38    do n = iv%info(radar)%n1,iv%info(radar)%n2
39       do k = 1, iv%info(radar)%levels(n)
40          if (iv%radar(n)%height_qc(k) /= far_below_model_surface .and. &
41               iv%radar(n)%height_qc(k) /= above_model_lid) then
42             ! rv
43             if (use_radar_rv) then
44                call da_max_error_qc_radar(it, iv%info(radar), n, iv%radar(n)%rv(k), max_error_rv, irv, irvf, &
45                   check_max_iv_unit, 'rv   ', failed, check_max_iv_print)
46             end if
47 
48             ! rf
49             if (use_radar_rf) then
50                call da_max_error_qc_radar(it, iv%info(radar), n, iv%radar(n)%rf(k), max_error_rf, irf, irff, &
51                   check_max_iv_unit, 'rf   ', failed, check_max_iv_print)
52             end if
53          end if
54       end do
55    end do
56 
57    if (trace_use) call da_trace_exit("da_check_max_iv_radar")
58 
59 end subroutine da_check_max_iv_radar
60 
61 
62