1 subroutine da_jo_synop_uvtq(iv, re, jo_grad_y, jo)
3 !-----------------------------------------------------------------------
4 ! Purpose: Ensures that exactly the same code is used for both
5 ! serial and parallel computations when testing_dm_bitwise_exact is set.
6 !-----------------------------------------------------------------------
10 type (iv_type), intent(in) :: iv ! Innovation vector.
11 type (y_type), intent(in) :: re ! Residual vector.
12 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
13 type (jo_type), intent(inout) :: jo ! Obs cost function.
17 if (trace_use_dull) call da_trace_entry("da_jo_synop_uvtq")
19 do n=1, iv%info(synop)%nlocal
20 if (iv%info(synop)%proc_domain(1,n)) then
21 jo % synop_u = jo % synop_u - re%synop(n)%u * jo_grad_y%synop(n)%u
22 jo % synop_v = jo % synop_v - re%synop(n)%v * jo_grad_y%synop(n)%v
23 jo % synop_t = jo % synop_t - re%synop(n)%t * jo_grad_y%synop(n)%t
24 jo % synop_p = jo % synop_p - re%synop(n)%p * jo_grad_y%synop(n)%p
25 jo % synop_q = jo % synop_q - re%synop(n)%q * jo_grad_y%synop(n)%q
29 if (trace_use_dull) call da_trace_exit("da_jo_synop_uvtq")
31 end subroutine da_jo_synop_uvtq