da_check_max_iv_sound.inc
References to this file elsewhere.
1 subroutine da_check_max_iv_sound(it, sound, &
2 itu,ituf,itvv,itvvf,itt,ittf,itqv,itqvf)
3
4 !-----------------------------------------------------------------------
5 ! Purpose: TBD
6 !-----------------------------------------------------------------------
7
8 implicit none
9
10 integer, intent (in) :: it ! Outer iteration
11 type (sound_type), intent(inout) :: sound
12 integer, intent(inout) :: itu,ituf,itvv,itvvf,itt,ittf,itqv,itqvf
13
14 integer :: k
15 logical :: failed
16
17 !---------------------------------------------------------------------------
18 ! [1.0] Open diagnostic file:
19 !---------------------------------------------------------------------------
20
21 if (rootproc .and. check_max_iv_print) then
22 write (check_max_iv_unit,'(A)') &
23 '----------------------------------------------------------------'
24 write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
25
26 write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))') &
27 'Error max test ratio for Sound_U = ',max_error_uv, &
28 'Error max test ratio for Sound_V = ',max_error_uv, &
29 'Error max test ratio for Sound_T = ',max_error_t, &
30 'Error max test ratio for Sound_QV = ',max_error_q
31 end if
32
33 !---------------------------------------------------------------------------
34 ! [2.0] Perform maximum innovation vector check:
35 !---------------------------------------------------------------------------
36
37 failed = .false.
38
39 do k = 1, sound % info % levels
40 ! U-wind
41
42 if (sound % u(k) % qc >= obs_qc_pointer) then
43 call da_max_error_qc(it, sound % info, sound % u(k), &
44 max_error_uv, itu, ituf, check_max_iv_unit, 'U ', &
45 failed, check_max_iv_print)
46 end if
47
48 ! V-wind
49
50 if (sound % v(k) % qc >= obs_qc_pointer) then
51 call da_max_error_qc (it, sound % info, sound % v(k),&
52 max_error_uv, itvv, itvvf, check_max_iv_unit, 'V ', &
53 failed, check_max_iv_print)
54 end if
55
56 ! Temperature
57
58 if (sound % t(k) % qc >= obs_qc_pointer) then
59 call da_max_error_qc (it, sound % info, sound % t(k),&
60 max_error_t, itt, ittf, check_max_iv_unit, 'TEMP ', &
61 failed, check_max_iv_print)
62 end if
63
64 ! Mixing ratio, same ratio as relative humidity
65
66 if (sound % q(k) % qc >= obs_qc_pointer) then
67 call da_max_error_qc (it, sound % info, sound % q(k), &
68 max_error_q, itqv, itqvf, check_max_iv_unit, 'QV ', &
69 failed, check_max_iv_print)
70 end if
71 end do
72
73 end subroutine da_check_max_iv_sound
74
75