1 subroutine da_jo_tamdar_sfc_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_tamdar_sfc_uvtq")
19 do n=1, iv%info(tamdar_sfc)%nlocal
20 if (iv%info(tamdar_sfc)%proc_domain(1,n)) then
21 jo % tamdar_sfc_u = jo % tamdar_sfc_u - re%tamdar_sfc(n)%u * jo_grad_y%tamdar_sfc(n)%u
22 jo % tamdar_sfc_v = jo % tamdar_sfc_v - re%tamdar_sfc(n)%v * jo_grad_y%tamdar_sfc(n)%v
23 jo % tamdar_sfc_t = jo % tamdar_sfc_t - re%tamdar_sfc(n)%t * jo_grad_y%tamdar_sfc(n)%t
24 jo % tamdar_sfc_p = jo % tamdar_sfc_p - re%tamdar_sfc(n)%p * jo_grad_y%tamdar_sfc(n)%p
25 jo % tamdar_sfc_q = jo % tamdar_sfc_q - re%tamdar_sfc(n)%q * jo_grad_y%tamdar_sfc(n)%q
29 if (trace_use_dull) call da_trace_exit("da_jo_tamdar_sfc_uvtq")
31 end subroutine da_jo_tamdar_sfc_uvtq