1 subroutine da_calculate_grady_gpsref(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_gpsref")
18 do n=1, iv%info(gpsref)%nlocal
19 do k=1, iv%info(gpsref)%levels(n)
20 if (iv%gpsref(n)%ref(k)%qc < obs_qc_pointer) then
21 re%gpsref(n)%ref(k) = 0.0
23 jo_grad_y%gpsref(n)%ref(k) = -re%gpsref(n)%ref(k) / (iv%gpsref(n)%ref(k)%error * iv%gpsref(n)%ref(k)%error)
27 if (trace_use_dull) call da_trace_exit("da_calculate_grady_gpsref")
29 end subroutine da_calculate_grady_gpsref