1 function da_residual(n, k, yy, ox, n_bad) result (rr)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer, intent(in) :: n, k
10 type (field_type), intent(in) :: ox
11 real, intent(in) :: yy
12 type (bad_info_type), intent(inout) :: n_bad
16 if (trace_use_frequent) call da_trace_entry("da_residual")
19 if (k ==0 .OR. n==0) then
24 if (ox % qc >= obs_qc_pointer) then
26 ! n_bad % num % use = n_bad % num % use + 1
29 ! if (ox % qc /= -88) then
30 ! n_bad % num % bad = n_bad % num % bad + 1
31 ! n_bad % nn(n_bad % num % bad) = n
32 ! n_bad % kk(n_bad % num % bad) = k
34 ! n_bad % num % miss = n_bad % num % miss + 1
38 if (trace_use_frequent) call da_trace_exit("da_residual")
40 end function da_residual