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