1 subroutine da_calculate_grady_pseudo(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_pseudo")
17 do n=1, iv%info(pseudo)%nlocal
18 if (iv%pseudo(n)%u%qc < obs_qc_pointer) re%pseudo(n)%u = 0.0
19 if (iv%pseudo(n)%v%qc < obs_qc_pointer) re%pseudo(n)%v = 0.0
20 if (iv%pseudo(n)%t%qc < obs_qc_pointer) re%pseudo(n)%t = 0.0
21 if (iv%pseudo(n)%p%qc < obs_qc_pointer) re%pseudo(n)%p = 0.0
22 if (iv%pseudo(n)%q%qc < obs_qc_pointer) re%pseudo(n)%q = 0.0
24 jo_grad_y%pseudo(n)%u = -re%pseudo(n)%u / (iv%pseudo(n)%u%error * iv%pseudo(n)%u%error)
25 jo_grad_y%pseudo(n)%v = -re%pseudo(n)%v / (iv%pseudo(n)%v%error * iv%pseudo(n)%v%error)
26 jo_grad_y%pseudo(n)%t = -re%pseudo(n)%t / (iv%pseudo(n)%t%error * iv%pseudo(n)%t%error)
27 jo_grad_y%pseudo(n)%p = -re%pseudo(n)%p / (iv%pseudo(n)%p%error * iv%pseudo(n)%p%error)
28 jo_grad_y%pseudo(n)%q = -re%pseudo(n)%q / (iv%pseudo(n)%q%error * iv%pseudo(n)%q%error)
31 if (trace_use_dull) call da_trace_exit("da_calculate_grady_pseudo")
33 end subroutine da_calculate_grady_pseudo