da_check_max_iv_geoamv.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_geoamv(iv, it, itu,ituf,itvv,itvvf)
2 
3    !-------------------------------------------------------------------------
4    ! Purpose: Innovation vector check for Geo. AMVs               
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
12 
13    integer :: k,n
14    logical :: failed
15 
16    if (trace_use_dull) call da_trace_entry("da_check_max_iv_geoamv")
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 GeoAMV_U   = ',max_error_uv, &
28          'Error max test ratio for GeoAMV_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(geoamv)%n1,iv%info(geoamv)%n2
38       do k = 1, iv%info(geoamv)%levels(n)
39          call da_max_error_qc(it, iv%info(geoamv), n, iv%geoamv(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(geoamv), n, iv%geoamv(n)%v(k), max_error_uv, itvv, itvvf, &
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_geoamv")
47 
48 end subroutine da_check_max_iv_geoamv      
49 
50