da_calculate_grady_ssmt1.inc

References to this file elsewhere.
1 subroutine da_calculate_grady_ssmt1(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 
16    if (iv%num_ssmt1 > 0) then  
17       do n=1, iv%num_ssmt1
18          do k=1, iv%ssmt1(n)%info%levels
19 
20             if (iv%ssmt1(n)%t(k)%qc < obs_qc_pointer) re%ssmt1(n)%t(k) = 0.0
21             jo_grad_y%ssmt1(n)%t(k) = -re%ssmt1(n)%t(k) / &
22                                       (iv%ssmt1(n)%t(k)%error * &
23                                         iv%ssmt1(n)%t(k)%error)
24 
25          end do
26       end do
27    end if
28 
29 end subroutine da_calculate_grady_ssmt1
30 
31