da_calculate_grady_geoamv.inc

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