da_check_max_iv_airsr.inc
References to this file elsewhere.
1 subroutine da_check_max_iv_airsr(iv, it,itt,ittf,itqv,itqvf)
2
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies max error check on AIRS retrievals
5 !-------------------------------------------------------------------------
6
7 implicit none
8
9 type(iv_type), intent(inout) :: iv
10 integer, intent(in) :: it ! Outer iteration
11 integer, intent(inout) :: 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_airsr")
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 AIRS_T = ',max_error_t, &
29 'Error max test ratio for AIRS_QV = ',max_error_q
30 end if
31
32 !---------------------------------------------------------------------------
33 ! [2.0] Perform maximum innovation vector check:
34 !---------------------------------------------------------------------------
35
36 failed = .false.
37
38 do n=iv%info(airsr)%n1,iv%info(airsr)%n2
39 do k = 1, iv%info(airsr)%levels(n)
40 ! Temperature
41 if (iv%airsr(n)%t(k)%qc >= obs_qc_pointer) then
42 call da_max_error_qc (it, iv%info(airsr), n, iv%airsr(n)%t(k),&
43 max_error_t, itt, ittf, check_max_iv_unit, 'TEMP ', &
44 failed, check_max_iv_print)
45
46 end if
47 ! Mixing ratio, same ratio as relative humidity
48 if (iv%airsr(n)%q(k)%qc >= obs_qc_pointer) then
49 call da_max_error_qc (it, iv%info(airsr), n, iv%airsr(n)%q(k), &
50 max_error_q, itqv, itqvf, check_max_iv_unit, 'QV ', &
51 failed, check_max_iv_print)
52 end if
53 end do
54 end do
55
56 if (trace_use_dull) call da_trace_exit("da_check_max_iv_airsr")
57
58 end subroutine da_check_max_iv_airsr
59
60