1 subroutine da_ao_stats_ssmt1 (stats_unit, iv, re)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer, intent (in) :: stats_unit ! Output unit for stats.
10 type (iv_type), intent (inout) :: iv ! OI
11 type (y_type), intent (in) :: re ! O-A
13 type (maxmin_type) :: minimum
14 type (maxmin_type) :: maximum
17 real :: average, rms_err
19 if (trace_use_dull) call da_trace_entry("da_ao_stats_ssmt1")
23 maximum = maxmin_type(-1.0E+20, 0, 0)
24 minimum = maxmin_type (1.0E+20, 0, 0)
28 if (iv%info(ssmt1)%nlocal > 0) then
29 do n=1, iv%info(ssmt1)%nlocal
30 if (iv%info(ssmt1)%proc_domain(1,n)) then
31 do k=1, iv%info(ssmt1)%levels(n)
32 call da_stats_calculate (n, k, iv%ssmt1(n)%t(k)%qc, re%ssmt1(n)%t(k), nt, &
33 minimum, maximum, average, rms_err)
35 end if ! end if (iv%info(ssmt1)%proc_domain(1,n))
39 ! Do inter-processor communication to gather statistics.
40 call da_proc_sum_int (nt)
43 call da_proc_stats_combine(average, rms_err, minimum%value, maximum%value, &
44 minimum%n, maximum%n, minimum%l, maximum%l)
48 write(unit=stats_unit, fmt='(/a/)') ' Diagnostics of O-A for SSMT1'
49 call da_print_stats_ssmt1 (stats_unit, nt, minimum, maximum, average, rms_err)
53 if (trace_use_dull) call da_trace_exit("da_ao_stats_ssmt1")
55 end subroutine da_ao_stats_ssmt1