da_ao_stats_satem.inc
References to this file elsewhere.
1 subroutine da_ao_stats_satem (stats_unit, oi, re)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: TBD
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 integer, intent (in) :: stats_unit ! Output unit for stats.
10 type (ob_type), intent (in) :: oi ! OI
11 type (y_type), intent (in) :: re ! A - O
12
13 type (stats_satem_type) :: Satem
14 integer :: nthickness
15 integer :: n, k
16
17 nthickness = 0
18 num_satem_tot = 0
19
20 Satem%maximum%thickness = maxmin_type (missing_r, 0, 0)
21 Satem%minimum%thickness = maxmin_type(-missing_r, 0, 0)
22 Satem%average = residual_satem1_type(0.0)
23 Satem%rms_err = Satem%average
24
25 if (oi%num_satem > 0) then
26 nthickness = 0
27
28 Satem%maximum%thickness = maxmin_type(0.0, 0, 0)
29
30 Satem%minimum = Satem%maximum
31 Satem%average = residual_satem1_type(0.0)
32 Satem%rms_err = Satem%average
33
34 do n=1, oi%num_Satem
35 if (oi%satem(n)%loc%proc_domain) then
36 do k=1, oi%satem(n)%info%levels
37 call da_stats_calculate (n, k, oi%Satem(n)%thickness(k)%qc, &
38 re%satem(n)%thickness(k), nthickness, &
39 Satem%minimum%thickness, Satem%maximum%thickness, &
40 Satem%average%thickness, Satem%rms_err%thickness)
41 end do
42 end if ! end if (oi%satem(n)%loc%proc_domain)
43 end do
44 end if
45
46 ! Do inter-processor communication to gather statistics.
47 call da_proc_sum_int (nthickness)
48 num_satem_tot = nthickness
49
50 call da_proc_stats_combine(Satem%average%thickness, Satem%rms_err%thickness, &
51 Satem%minimum%thickness%value, Satem%maximum%thickness%value, &
52 Satem%minimum%thickness%n, Satem%maximum%thickness%n, &
53 Satem%minimum%thickness%l, Satem%maximum%thickness%l)
54
55 if (rootproc) then
56 if (nthickness /= 0) then
57 write(unit=stats_unit, fmt='(/a/)') ' Diagnostics of AO for satem'
58 call da_print_stats_satem(stats_unit, nthickness, Satem)
59 end if
60 end if
61
62 end subroutine da_ao_stats_satem
63
64