1 subroutine da_stats_calculate(n, k, qc_flag, x, nn, minimum, maximum, &
4 !-----------------------------------------------------------------------
6 !-----------------------------------------------------------------------
10 integer, intent(in) :: n ! Sequence number of ob.
11 integer, intent(in) :: k ! Level of ob.
12 integer, intent(in) :: qc_flag ! QC flag.
13 real, intent(in) :: x ! Value.
14 integer, intent(inout) :: nn ! Number of ok obs.
15 type (maxmin_type), intent(inout) :: minimum, maximum
16 real, intent(inout) :: average, rms_err
18 if (trace_use_dull) call da_trace_entry("da_stats_calculate")
20 if (qc_flag >= obs_qc_pointer) then
23 if (x < minimum%value) then
29 if (x > maximum%value) then
36 rms_err = rms_err + x * x
39 if (trace_use_dull) call da_trace_exit("da_stats_calculate")
41 end subroutine da_stats_calculate