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