1 subroutine da_ao_stats_ssmi_rv (stats_unit, iv, re)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer, intent (in) :: stats_unit ! Output unit for stats.
10 type (iv_type), intent (inout) :: iv ! iv
11 type (y_type), intent (in) :: re ! A - O
13 integer :: ntpw, nspeed, n
14 type (stats_ssmi_rv_type) :: stats
16 if (trace_use) call da_trace_entry("da_ao_stats_ssmi_rv")
21 stats%maximum%tpw = maxmin_type (missing_r, 0, 0)
22 stats%maximum%speed = maxmin_type (missing_r, 0, 0)
23 stats%minimum%tpw = maxmin_type(-missing_r, 0, 0)
24 stats%minimum%speed = maxmin_type(-missing_r, 0, 0)
25 stats%average = residual_ssmi_rv_type(0.0, 0.0)
26 stats%rms_err = stats%average
28 if (iv%info(ssmi_rv)%nlocal > 0) then
29 do n=1, iv%info(ssmi_rv)%nlocal
30 if (iv%info(ssmi_rv)%proc_domain(1,n)) then
31 call da_stats_calculate (n, 0, iv%ssmi_rv(n)%tpw%qc, &
32 re%ssmi_rv(n)%tpw, ntpw, &
33 stats%minimum%tpw, stats%maximum%tpw,&
34 stats%average%tpw, stats%rms_err%tpw)
36 call da_stats_calculate (n, 0, iv%ssmi_rv(n)%speed%qc, &
37 re%ssmi_rv(n)%speed, nspeed, &
38 stats%minimum%speed, stats%maximum%speed,&
39 stats%average%speed, stats%rms_err%speed)
44 ! Do inter-processor communication to gather statistics.
45 call da_proc_sum_int (ntpw)
46 call da_proc_sum_int (nspeed)
47 iv%nstats(ssmi_rv) = ntpw + nspeed
49 call da_proc_stats_combine(stats%average%tpw, stats%rms_err%tpw, &
50 stats%minimum%tpw%value, stats%maximum%tpw%value, &
51 stats%minimum%tpw%n, stats%maximum%tpw%n, &
52 stats%minimum%tpw%l, stats%maximum%tpw%l)
54 call da_proc_stats_combine(stats%average%speed, stats%rms_err%speed, &
55 stats%minimum%speed%value, stats%maximum%speed%value, &
56 stats%minimum%speed%n, stats%maximum%speed%n, &
57 stats%minimum%speed%l, stats%maximum%speed%l)
62 write(unit=stats_unit, fmt='(/a/)') ' Diagnostics of AO for ssmi_retrieval'
63 write(unit=stats_unit, fmt='(a/)') ' var tpw(cm) n'
64 write(unit=stats_unit, fmt='(a,i14)') ' Number: ', ntpw
65 write(unit=stats_unit, fmt='(a, f12.4,i5)') &
66 ' Minimum(n): ', stats%minimum%tpw%value, stats%minimum%tpw%n , &
67 ' Maximum(n): ', stats%maximum%tpw%value, stats%maximum%tpw%n
68 write(unit=stats_unit, fmt='(a, f12.4,5x)') &
69 ' Average : ', stats%average%tpw/real(ntpw), &
70 ' RMSE : ', sqrt(stats%rms_err%tpw/real(ntpw))
74 write(unit=stats_unit, fmt='(/a/)') ' Diagnostics of AO for ssmi_retrieval'
75 write(unit=stats_unit, fmt='(a/)') ' var Speed(m/s) n'
76 write(unit=stats_unit, fmt='(a,i14)') ' Number: ', nspeed
77 write(unit=stats_unit, fmt='(a, f12.4,i5)') &
78 ' Minimum(n): ', stats%minimum%speed%value, stats%minimum%speed%n , &
79 ' Maximum(n): ', stats%maximum%speed%value, stats%maximum%speed%n
80 write(unit=stats_unit, fmt='(a, f12.4,5x)') &
81 ' Average : ', stats%average%Speed/real(nspeed), &
82 ' RMSE : ', sqrt(stats%rms_err%Speed/real(nspeed))
86 if (trace_use) call da_trace_exit("da_ao_stats_ssmi_rv")
88 end subroutine da_ao_stats_ssmi_rv