da_calculate_grady_pilot.inc
References to this file elsewhere.
1 subroutine da_calculate_grady_pilot(iv, re, jo_grad_y)
2
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re-vector
5 !-------------------------------------------------------------------------
6
7 implicit none
8
9
10 type (ob_type), intent(in) :: iv ! Innovation vector.
11 type (y_type), intent(inout) :: re ! Residual vector.
12 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
13
14
15 integer :: n, k
16
17
18 if (iv%num_pilot > 0) then
19 do n=1, iv%num_pilot
20 do k=1, iv%pilot(n)%info%levels
21 if (iv%pilot(n)%u(k)%qc < obs_qc_pointer) re%pilot(n)%u(k) = 0.0
22 if (iv%pilot(n)%v(k)%qc < obs_qc_pointer) re%pilot(n)%v(k) = 0.0
23
24 jo_grad_y%pilot(n)%u(k) = -re%pilot(n)%u(k) / &
25 (iv%pilot(n)%u(k)%error * &
26 iv%pilot(n)%u(k)%error)
27 jo_grad_y%pilot(n)%v(k) = -re%pilot(n)%v(k) / &
28 (iv%pilot(n)%v(k)%error * &
29 iv%pilot(n)%v(k)%error)
30 end do
31 end do
32 end if
33
34 end subroutine da_calculate_grady_pilot
35
36