da_jo_sonde_sfc_uvtq.inc
References to this file elsewhere.
1 subroutine da_jo_sonde_sfc_uvtq(iv, re, jo_grad_y, jo)
2
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 !-----------------------------------------------------------------------
7
8 implicit none
9
10 type (ob_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.
14
15 integer :: n
16
17 do n=1, iv%num_sound
18 if (iv%sonde_sfc(n)%loc%proc_domain) then
19 jo % sonde_sfc_u = jo % sonde_sfc_u - re%sonde_sfc(n)%u * jo_grad_y%sonde_sfc(n)%u
20 jo % sonde_sfc_v = jo % sonde_sfc_v - re%sonde_sfc(n)%v * jo_grad_y%sonde_sfc(n)%v
21 jo % sonde_sfc_t = jo % sonde_sfc_t - re%sonde_sfc(n)%t * jo_grad_y%sonde_sfc(n)%t
22 jo % sonde_sfc_p = jo % sonde_sfc_p - re%sonde_sfc(n)%p * jo_grad_y%sonde_sfc(n)%p
23 jo % sonde_sfc_q = jo % sonde_sfc_q - re%sonde_sfc(n)%q * jo_grad_y%sonde_sfc(n)%q
24 end if
25 end do
26
27 end subroutine da_jo_sonde_sfc_uvtq
28
29