da_check_max_iv_sound.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_sound(iv, it, itu,ituf,itv,itvf,itt,ittf,itqv,itqvf)
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,itt,ittf,itqv,itqvf
12 
13    integer :: k,n
14    logical :: failed
15 
16    if (trace_use_dull) call da_trace_entry("da_check_max_iv_sound")
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 Sound_U   = ',max_error_uv, &
29          'Error max test ratio for Sound_V   = ',max_error_uv, &
30          'Error max test ratio for Sound_T   = ',max_error_t,  &
31          'Error max test ratio for Sound_QV  = ',max_error_q
32    end if
33 
34    !---------------------------------------------------------------------------
35    ! [2.0] Perform maximum innovation vector check:
36    !---------------------------------------------------------------------------
37 
38    failed = .false.
39 
40    do n = iv%info(sound)%n1,iv%info(sound)%n2
41       do k = 1, iv%info(sound)%levels(n)
42          call da_max_error_qc (it, iv%info(sound), n, iv%sound(n)%u(k), max_error_uv, itu, ituf, &
43             check_max_iv_unit, 'U    ', failed, check_max_iv_print)
44          call da_max_error_qc (it, iv%info(sound), n, iv%sound(n)%v(k), max_error_uv, itv, itvf, &
45             check_max_iv_unit, 'V    ', failed, check_max_iv_print)                           
46          call da_max_error_qc (it, iv%info(sound), n, iv%sound(n)%t(k), max_error_t,  itt, ittf, &
47             check_max_iv_unit, 'TEMP ', failed, check_max_iv_print)                           
48          call da_max_error_qc (it, iv%info(sound), n, iv%sound(n)%q(k), max_error_q,  itqv, itqvf, &
49             check_max_iv_unit, 'QV   ', failed, check_max_iv_print)                           
50       end do
51    end do
52 
53    if (trace_use_dull) call da_trace_exit("da_check_max_iv_sound")
54 
55 end subroutine da_check_max_iv_sound
56 
57