da_calculate_grady_gpspw.inc

References to this file elsewhere.
1 subroutine da_calculate_grady_gpspw(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
14 
15 
16    if (iv%num_Gpspw > 0) then
17       do n=1, iv%num_Gpspw
18          if (iv%gpspw(n)%tpw%qc < obs_qc_pointer) then
19             re%gpspw(n)%tpw = 0.0
20          end if
21 
22          jo_grad_y%Gpspw(n)%tpw = -re%Gpspw(n)%tpw / &
23                                     (iv%Gpspw(n)%tpw%error * &
24                                       iv%Gpspw(n)%tpw%error)
25       end do
26    end if
27 
28 end subroutine da_calculate_grady_gpspw
29 
30