da_check_max_iv_ssmt2.inc
References to this file elsewhere.
1 subroutine da_check_max_iv_ssmt2(iv, it, irh,irhf)
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) :: irh, irhf
12
13 integer :: k,n
14 logical :: failed
15
16 if (trace_use_dull) call da_trace_entry("da_check_max_iv_ssmt2")
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 SSMT2_RH = ',max_error_rh
29 end if
30
31 !---------------------------------------------------------------------------
32 ! [2.0] Perform maximum innovation vector check:
33 !---------------------------------------------------------------------------
34
35 failed = .false.
36
37 do n=iv%info(ssmt2)%n1,iv%info(ssmt2)%n2
38 do k = 1, iv%info(ssmt2)%levels(n)
39 ! Temperature
40 call da_max_error_qc (it, iv%info(ssmt2), n, iv%ssmt2(n)%rh(k),&
41 max_error_t, irh, irhf, check_max_iv_unit, 'RH ', 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_ssmt2")
46
47 end subroutine da_check_max_iv_ssmt2
48
49