1 subroutine da_calculate_grady_qscat(iv, re, jo_grad_y)
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re-vector
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_qscat")
18 do n=1, iv%info(qscat)%nlocal
19 if (iv%qscat(n)%u%qc < obs_qc_pointer) re%qscat(n)%u = 0.0
20 if (iv%qscat(n)%v%qc < obs_qc_pointer) re%qscat(n)%v = 0.0
21 jo_grad_y%qscat(n)%u = -re%qscat(n)%u / (iv%qscat(n)%u%error * iv%qscat(n)%u%error)
22 jo_grad_y%qscat(n)%v = -re%qscat(n)%v / (iv%qscat(n)%v%error * iv%qscat(n)%v%error)
25 if (trace_use_dull) call da_trace_exit("da_calculate_grady_qscat")
27 end subroutine da_calculate_grady_qscat