1 subroutine da_calculate_grady_gpseph(iv, re, jo_grad_y)
3 !----------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re (residual) 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_gpseph")
17 do n=1, iv%info(gpseph)%nlocal
18 do k=1, iv%info(gpseph)%levels(n)
19 ! Since we calculate the nonlocal thing globally, we have to exclude the obs located at boundaries.
20 if (iv%gpseph(n)%eph(k)%qc < obs_qc_pointer .or. &
21 .not. iv%info(gpseph)%proc_domain(1,n) ) then
22 re%gpseph(n)%eph(k) = 0.0
24 if ( iv%gpseph(n)%eph(k)%qc >= obs_qc_pointer ) then
25 jo_grad_y%gpseph(n)%eph(k) = -re%gpseph(n)%eph(k) / (iv%gpseph(n)%eph(k)%error * iv%gpseph(n)%eph(k)%error)
30 if (trace_use_dull) call da_trace_exit("da_calculate_grady_gpseph")
32 end subroutine da_calculate_grady_gpseph