da_check_max_iv_gpsref.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_gpsref(iv,it, pref, fref)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    type(iv_type), intent(inout) :: iv
10    integer,       intent(in)    :: it       ! External iteration.
11    integer,       intent(inout) :: pref, fref
12 
13    integer                           :: k,n
14    logical                           :: failed
15 
16    if (trace_use_dull) call da_trace_entry("da_check_max_iv_gpsref")
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 GPSRef = ', max_error_ref
29    end if
30 
31    !----------------------------------------------------------------------------
32    ! [2.0] Perform maximum innovation vector check:
33    !----------------------------------------------------------------------------
34 
35    failed = .false.
36 
37    do n = iv%info(gpsref)%n1,iv%info(gpsref)%n2
38       do k = 1, iv%info(gpsref)%levels(n)
39          call da_max_error_qc(it, iv%info(gpsref), n, iv%gpsref(n)%ref(k), &
40             max_error_ref, pref, fref, check_max_iv_unit, &
41             'GPSRef    ', failed, check_max_iv_print)
42       end do
43    end do
44 
45    if (trace_use_dull) call da_trace_exit("da_check_max_iv_gpsref")
46 
47 end subroutine da_check_max_iv_gpsref
48 
49