1 subroutine da_calculate_grady_radar(iv, re, jo_grad_y)
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re-vector
5 !-------------------------------------------------------------------------
9 type (iv_type), intent(in) :: iv ! Innovation vector.
10 type (y_type), intent(inout) :: re ! Residual vector.
11 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
15 if (trace_use_dull) call da_trace_entry("da_calculate_grady_radar")
17 do n=1, iv%info(radar)%nlocal
18 do k=1, iv%info(radar)%levels(n)
19 if (use_radar_rv) then
20 if (iv%radar(n)%rv(k)%qc < obs_qc_pointer) then
21 re%radar(n)%rv(k) = 0.0
23 jo_grad_y%radar(n)%rv(k) = -re%radar(n)%rv(k) / (iv%radar(n)%rv(k)%error * iv%radar(n)%rv(k)%error)
26 if (use_radar_rf) then
27 if (iv%radar(n)%rf(k)%qc < obs_qc_pointer) then
28 re%radar(n)%rf(k) = 0.0
30 jo_grad_y%radar(n)%rf(k) = -re%radar(n)%rf(k) / (iv%radar(n)%rf(k)%error * iv%radar(n)%rf(k)%error)
33 if (.not.use_radar_rf .and. use_radar_rhv) then
34 if (iv%radar(n)%rrn(k)%qc < obs_qc_pointer) then
35 re%radar(n)%rrn(k) = 0.0
37 jo_grad_y%radar(n)%rrn(k) = -re%radar(n)%rrn(k) / (iv%radar(n)%rrn(k)%error * iv%radar(n)%rrn(k)%error)
38 if (iv%radar(n)%rsn(k)%qc < obs_qc_pointer) then
39 re%radar(n)%rsn(k) = 0.0
41 jo_grad_y%radar(n)%rsn(k) = -re%radar(n)%rsn(k) / (iv%radar(n)%rsn(k)%error * iv%radar(n)%rsn(k)%error)
42 if (iv%radar(n)%rgr(k)%qc < obs_qc_pointer) then
43 re%radar(n)%rgr(k) = 0.0
45 jo_grad_y%radar(n)%rgr(k) = -re%radar(n)%rgr(k) / (iv%radar(n)%rgr(k)%error * iv%radar(n)%rgr(k)%error)
48 if (use_radar_rqv) then
49 if (iv%radar(n)%rqv(k)%qc < obs_qc_pointer) then
50 re%radar(n)%rqv(k) = 0.0
52 jo_grad_y%radar(n)%rqv(k) = -re%radar(n)%rqv(k) / (iv%radar(n)%rqv(k)%error * iv%radar(n)%rqv(k)%error)
58 if (trace_use_dull) call da_trace_exit("da_calculate_grady_radar")
60 end subroutine da_calculate_grady_radar