1 subroutine da_max_error_qc_radar (it, info, n,field, max_error, ix, ixf, iunit, var, failed, print_details)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 integer , intent (in) :: it
10 type (infa_type) , intent(in) :: info
11 integer, intent(in) :: n
12 type (field_type), intent(inout) :: field
13 real , intent(in) :: max_error
14 integer , intent(inout) :: ix, ixf
15 integer , intent(in) :: iunit
16 character (len=*), intent(in) :: var
17 logical , intent(out) :: failed
18 logical , intent(in) :: print_details
23 if (trace_use) call da_trace_entry("da_max_error_qc_radar")
28 err_max = field % error * max_error
33 if (it > 1 .and. qc_flag == fails_error_max) field%qc = 0
34 if (err > err_max) then
35 if (field % qc > fails_error_max) field % qc = fails_error_max
40 if (print_details .and. failed) then
41 if (err_max .LE. 0.0) then
42 write (iunit , fmt = '(A,3(F12.1,1X),A,A,A,A,A,3f10.2)') &
43 "Err_max < 0 ==> ",err,err_max,max_error, " for ", var, &
44 " OBS ID: ", info%platform(n), &
45 " LA/LON/ELV:", info%lat(1,n), info%lon(1,n), info%elv(n)
46 ! call da_error(__FILE__,__LINE__,(/"Erk"/))
49 write (iunit , fmt = '(A,A,A,I5,A,I5,A,F4.1,A,A,A,2F12.1)') &
50 "Err_max failed:ID=", info%platform(n),&
51 " Ix=", ix, " Ixf=", ixf, " Err_max ratio =",err/err_max, &
52 " for ", var, " inv, error:",field % inv, field % error
57 if (trace_use) call da_trace_exit("da_max_error_qc_radar")
59 end subroutine da_max_error_qc_radar