1 subroutine da_calculate_grady_bogus(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_bogus")
17 do n=1, iv%info(bogus)%nlocal
18 if (iv%bogus(n)%slp%qc < obs_qc_pointer) then
22 jo_grad_y%bogus(n)%slp = -re%bogus(n)%slp / (iv%bogus(n)%slp%error * iv%bogus(n)%slp%error)
24 do k=1, iv%info(bogus)%levels(n)
25 if (iv%bogus(n)%u(k)%qc < obs_qc_pointer) re%bogus(n)%u(k) = 0.0
26 if (iv%bogus(n)%v(k)%qc < obs_qc_pointer) re%bogus(n)%v(k) = 0.0
27 if (iv%bogus(n)%t(k)%qc < obs_qc_pointer) re%bogus(n)%t(k) = 0.0
28 if (iv%bogus(n)%q(k)%qc < obs_qc_pointer) re%bogus(n)%q(k) = 0.0
30 jo_grad_y%bogus(n)%u(k) = -re%bogus(n)%u(k) / (iv%bogus(n)%u(k)%error * iv%bogus(n)%u(k)%error)
31 jo_grad_y%bogus(n)%v(k) = -re%bogus(n)%v(k) / (iv%bogus(n)%v(k)%error * iv%bogus(n)%v(k)%error)
32 jo_grad_y%bogus(n)%t(k) = -re%bogus(n)%t(k) / (iv%bogus(n)%t(k)%error * iv%bogus(n)%t(k)%error)
33 jo_grad_y%bogus(n)%q(k) = -re%bogus(n)%q(k) / (iv%bogus(n)%q(k)%error * iv%bogus(n)%q(k)%error)
37 if (trace_use_dull) call da_trace_exit("da_calculate_grady_bogus")
39 end subroutine da_calculate_grady_bogus