da_check_max_iv_profiler.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_profiler(iv, it, itu,ituf,itv,itvf)
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,itv,itvf
12 
13    integer :: k,n
14    logical :: failed
15    
16    if (trace_use_dull) call da_trace_entry("da_check_max_iv_profiler")
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       write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))')  &
27          'Error max test ratio for Profiler_U   = ',max_error_uv, &
28          'Error max test ratio for Profiler_V   = ',max_error_uv
29    end if
30 
31    !---------------------------------------------------------------------------
32    ! [2.0] Perform maximum innovation vector check:
33    !---------------------------------------------------------------------------
34 
35    failed = .false.
36 
37    do n = iv%info(profiler)%n1,iv%info(profiler)%n2
38       do k = 1, iv%info(profiler)%levels(n)
39          call da_max_error_qc (it, iv%info(profiler), n, iv%profiler(n)%u(k), max_error_uv, itu, ituf, &
40             check_max_iv_unit, 'U    ', failed, check_max_iv_print)
41          call da_max_error_qc (it, iv%info(profiler), n, iv%profiler(n)%v(k), max_error_uv, itv, itvf, &
42             check_max_iv_unit, 'V    ', failed, check_max_iv_print)                         
43       end do
44    end do
45    
46    if (trace_use_dull) call da_trace_exit("da_check_max_iv_profiler")
47 
48 end subroutine da_check_max_iv_profiler
49 
50