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 (iv_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    integer  :: n, k
15    
16    if (trace_use_dull) call da_trace_entry("da_calculate_grady_pilot")
17 
18    do n=1, iv%info(pilot)%nlocal
19       do k=1, iv%info(pilot)%levels(n)
20          if (iv%pilot(n)%u(k)%qc < obs_qc_pointer) re%pilot(n)%u(k) = 0.0
21          if (iv%pilot(n)%v(k)%qc < obs_qc_pointer) re%pilot(n)%v(k) = 0.0
22 
23          jo_grad_y%pilot(n)%u(k) = -re%pilot(n)%u(k) / (iv%pilot(n)%u(k)%error * iv%pilot(n)%u(k)%error)
24          jo_grad_y%pilot(n)%v(k) = -re%pilot(n)%v(k) / (iv%pilot(n)%v(k)%error * iv%pilot(n)%v(k)%error)
25       end do
26    end do
27    
28    if (trace_use_dull) call da_trace_exit("da_calculate_grady_pilot")
29 
30 end subroutine da_calculate_grady_pilot
31 
32