da_calculate_grady_sound.inc
References to this file elsewhere.
1 subroutine da_calculate_grady_sound(iv, re, jo_grad_y)
2
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re-vector
5 !-------------------------------------------------------------------------
6
7 implicit none
8
9 type (ob_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)
12
13 integer :: n, k
14
15 if (iv%num_sound > 0) then
16 do n=1, iv%num_sound
17 do k=1, iv%sound(n)%info%levels
18 if (iv%sound(n)%u(k)%qc < obs_qc_pointer) re%sound(n)%u(k) = 0.0
19 if (iv%sound(n)%v(k)%qc < obs_qc_pointer) re%sound(n)%v(k) = 0.0
20 if (iv%sound(n)%t(k)%qc < obs_qc_pointer) re%sound(n)%t(k) = 0.0
21 if (iv%sound(n)%q(k)%qc < obs_qc_pointer) re%sound(n)%q(k) = 0.0
22
23 jo_grad_y%sound(n)%u(k) = -re%sound(n)%u(k) / &
24 (iv%sound(n)%u(k)%error * &
25 iv%sound(n)%u(k)%error)
26 jo_grad_y%sound(n)%v(k) = -re%sound(n)%v(k) / &
27 (iv%sound(n)%v(k)%error * &
28 iv%sound(n)%v(k)%error)
29 jo_grad_y%sound(n)%t(k) = -re%sound(n)%t(k) / &
30 (iv%sound(n)%t(k)%error * &
31 iv%sound(n)%t(k)%error)
32 jo_grad_y%sound(n)%q(k) = -re%sound(n)%q(k) / &
33 (iv%sound(n)%q(k)%error * &
34 iv%sound(n)%q(k)%error)
35 end do
36 end do
37 end if
38
39 end subroutine da_calculate_grady_sound
40
41