da_check_max_iv_ssmt2.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_ssmt2(it, ssmt2, irh,irhf)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    integer, intent(in)                    :: it     ! outer iteration
10    integer, intent(inout)                 :: irh, irhf
11    type (ssmt2_type), intent(inout)       :: ssmt2
12 
13    integer                                :: k
14    logical                                :: failed
15 
16    !---------------------------------------------------------------------------
17    ! [1.0] Open diagnostic file:
18    !---------------------------------------------------------------------------
19 
20    if (rootproc .and. check_max_iv_print) then
21       write (check_max_iv_unit,'(A)')  &
22          '----------------------------------------------------------------'
23       write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
24 
25       write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))')  &
26          'Error max test ratio for SSMT2_RH  = ',max_error_rh
27    end if
28 
29    !---------------------------------------------------------------------------
30    !  [2.0] Perform maximum innovation vector check:
31    !---------------------------------------------------------------------------
32 
33    failed = .false.
34 
35    do k = 1, ssmt2 % info % levels
36       ! Temperature
37       call da_max_error_qc (it, ssmt2 % info, ssmt2 % rh(k),&
38                              max_error_t, irh, irhf, check_max_iv_unit, 'RH  ', &
39                              failed, check_max_iv_print)
40    end do
41 
42 end subroutine da_check_max_iv_ssmt2
43 
44