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