1 subroutine da_calculate_grady_polaramv(iv, re, jo_grad_y)
3 !-------------------------------------------------------------------------
4 ! Purpose: Calculates Gradient of Polar AMVs Obs.
5 !-------------------------------------------------------------------------
10 type (iv_type), intent(in) :: iv ! Innovation vector.
11 type (y_type), intent(inout) :: re ! Residual vector.
12 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
16 if (trace_use_dull) call da_trace_entry("da_calculate_grady_polaramv")
18 do n=1, iv%info(polaramv)%nlocal
19 do k=1, iv%info(polaramv)%levels(n)
20 if (iv%polaramv(n)%u(k)%qc < obs_qc_pointer) then
21 re%polaramv(n)%u(k) = 0.0
23 if (iv%polaramv(n)%v(k)%qc < obs_qc_pointer) then
24 re%polaramv(n)%v(k) = 0.0
27 jo_grad_y%polaramv(n)%u(k) = -re%polaramv(n)%u(k) / &
28 (iv%polaramv(n)%u(k)%error * iv%polaramv(n)%u(k)%error)
29 jo_grad_y%polaramv(n)%v(k) = -re%polaramv(n)%v(k) / &
30 (iv%polaramv(n)%v(k)%error * iv%polaramv(n)%v(k)%error)
34 if (trace_use_dull) call da_trace_exit("da_calculate_grady_polaramv")
36 end subroutine da_calculate_grady_polaramv