1 subroutine da_oi_stats_ssmt1 (stats_unit, iv)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer, intent (in) :: stats_unit ! Output unit for stats.
10 type (iv_type), intent (in) :: iv ! O-B
12 type (maxmin_type) :: minimum
13 type (maxmin_type) :: maximum
16 real :: average, rms_err
18 if (trace_use_dull) call da_trace_entry("da_oi_stats_ssmt1")
22 maximum = maxmin_type(-1.0E+20, 0, 0)
23 minimum = maxmin_type(1.0E+20, 0, 0)
27 do n=1, iv%info(ssmt1)%nlocal
28 if (iv%info(ssmt1)%proc_domain(1,n)) then
29 do k=1, iv%info(ssmt1)%levels(n)
30 call da_stats_calculate(n, k, iv%ssmt1(n)%t(k)%qc, iv%ssmt1(n)%t(k)%inv, nt, &
31 minimum, maximum, average, rms_err)
33 end if ! end if (iv%info(ssmt1)%proc_domain(1,n))
36 ! Do inter-processor communication to gather statistics.
37 call da_proc_sum_int(nt)
39 call da_proc_stats_combine(average, rms_err, minimum%value, maximum%value, &
40 minimum%n, maximum%n, minimum%l, maximum%l)
44 write(unit=stats_unit, fmt='(/a/)') ' Diagnostics of O-B for SSMT1'
45 call da_print_stats_ssmt1(stats_unit, nt, minimum, maximum, average, rms_err)
49 if (trace_use_dull) call da_trace_exit("da_oi_stats_ssmt1")
51 end subroutine da_oi_stats_ssmt1