da_check_max_iv_ssmi_tb.inc

References to this file elsewhere.
1 subroutine da_check_max_iv_ssmi_tb(it, ssmi_tb, &
2                                    itb19v, itb19vf, itb19h, itb19hf, &
3                                    itb22v, itb22vf,                  &
4                                    itb37v, itb37vf, itb37h, itb37hf, &
5                                    itb85v, itb85vf, itb85h, itb85hf)
6 
7    !-----------------------------------------------------------------------
8    ! Purpose: TBD
9    !-----------------------------------------------------------------------
10 
11    implicit none
12 
13    integer,             intent(in)        :: it
14    type (ssmi_tb_type), intent(inout)     :: ssmi_tb
15 
16    integer,    intent (inout)             :: itb19h, itb19v, itb22v
17    integer,    intent (inout)             :: itb37h, itb37v, itb85h, itb85v
18    integer,    intent (inout)             :: itb19hf, itb19vf, itb22vf 
19    integer,    intent (inout)             :: itb37hf, itb37vf, itb85hf, itb85vf
20 
21    logical                                :: failed
22 
23    !-----------------------------------------------------------------------------!
24    ! [1.0] Open diagnostic file:
25    !-----------------------------------------------------------------------------!
26 
27    if (rootproc .and. check_max_iv_print) then
28       write (check_max_iv_unit,'(A)')  &
29          '----------------------------------------------------------------'
30       write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
31       write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))')  &
32          'Error max test ratio for SSMI_tb_TB19h = ',max_error_tb, &
33          'Error max test ratio for SSMI_tb_TB19v = ',max_error_tb, &
34          'Error max test ratio for SSMI_tb_TB22v = ',max_error_tb, &
35          'Error max test ratio for SSMI_tb_TB37h = ',max_error_tb, &
36          'Error max test ratio for SSMI_tb_TB37v = ',max_error_tb, &
37          'Error max test ratio for SSMI_tb_TB85h = ',max_error_tb, &
38          'Error max test ratio for SSMI_tb_TB85v = ',max_error_tb
39    end if
40 
41    !  itb19h  = 0; itb19v  = 0; itb22v  = 0; 
42    !  itb37h  = 0; itb37v  = 0; itb85h  = 0; itb85v  = 0
43    !  itb19hf = 0; itb19vf = 0; itb22vf = 0;
44    !  itb37hf = 0; itb37vf = 0; itb85hf = 0; itb85vf = 0
45 
46    !---------------------------------------------------------------------------
47    ! [2.0] Perform maximum innovation vector check:
48    !---------------------------------------------------------------------------
49 
50    ! failed=.false. is defined inside the da_max_error_qc 
51    ! failed = .false.
52 
53    ! Tb19h
54 
55    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb19h,                  &
56                             max_error_tb, itb19h, itb19hf, check_max_iv_unit, 'TB19h', &
57                             failed, check_max_iv_print)
58 
59    ! Tb19v
60 
61    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb19v,                  &
62                             max_error_tb, itb19v, itb19vf, check_max_iv_unit, 'TB19v', &
63                             failed, check_max_iv_print)
64 
65    ! Tb22v
66 
67    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb22v,                  &
68                             max_error_tb, itb22v, itb22vf, check_max_iv_unit, 'TB22v', &
69                             failed, check_max_iv_print)
70 
71    ! Tb37h
72 
73    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb37h,                  &
74                             max_error_tb, itb37h, itb37hf, check_max_iv_unit, 'TB37h', &
75                             failed, check_max_iv_print)
76 
77    ! Tb37v
78 
79    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb37v,                  &
80                             max_error_tb, itb37v, itb37vf, check_max_iv_unit, 'TB37v', &
81                             failed, check_max_iv_print)
82 
83    ! Tb85h
84 
85    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb85h,                  &
86                             max_error_tb, itb85h, itb85hf, check_max_iv_unit, 'TB85h', &
87                             failed, check_max_iv_print)
88 
89    ! Tb85v
90 
91    call da_max_error_qc(it, ssmi_tb % info, ssmi_tb % tb85v,                  &
92                             max_error_tb, itb85v, itb85vf, check_max_iv_unit, 'TB85v', &
93                             failed, check_max_iv_print)
94 
95 
96 
97    !---------------------------------------------------------------------------
98    ! [3.0] Output test failed results:
99    !---------------------------------------------------------------------------
100 
101    ! if (rootproc .and. check_max_iv_print .and. failed) then
102    !    write (unit = check_max_iv_unit, fmt = '(/,10(2(A,I6),/))') &
103    !       'Number of failed ssmi tb19h observations:  ',itb19hf,' on ',itb19h, &
104    !       'Number of failed ssmi tb19v observations:  ',itb19vf,' on ',itb19v, &
105    !       'Number of failed ssmi tb22v observations:  ',itb22vf,' on ',itb22v, &
106    !       'Number of failed ssmi tb37h observations:  ',itb37hf,' on ',itb37h, &
107    !       'Number of failed ssmi tb37v observations:  ',itb37vf,' on ',itb37v, &
108    !       'Number of failed ssmi tb85h observations:  ',itb85hf,' on ',itb85h, &
109    !       'Number of failed ssmi tb85v observations:  ',itb85vf,' on ',itb85v
110    ! end if
111 
112 end subroutine da_check_max_iv_ssmi_tb
113 
114