da_jo_sound_uvtq.inc
References to this file elsewhere.
1 subroutine da_jo_sound_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, k
16
17 do n=1, iv%num_sound
18 if (iv%sound(n)%loc%proc_domain) then
19 do k=1, iv%sound(n)%info%levels
20 jo % sound_u = jo % sound_u - &
21 re%sound(n)%u(k) * jo_grad_y%sound(n)%u(k)
22 jo % sound_v = jo % sound_v - &
23 re%sound(n)%v(k) * jo_grad_y%sound(n)%v(k)
24 jo % sound_t = jo % sound_t - &
25 re%sound(n)%t(k) * jo_grad_y%sound(n)%t(k)
26 jo % sound_q = jo % sound_q - &
27 re%sound(n)%q(k) * jo_grad_y%sound(n)%q(k)
28 end do
29 end if
30 end do
31
32 end subroutine da_jo_sound_uvtq
33
34