da_calculate_grady_profiler.inc

References to this file elsewhere.
1 subroutine da_calculate_grady_profiler(iv, re, jo_grad_y)
2 
3    !---------------------------------------------------------------------------
4    ! Purpose: Applies obs inverse on re-vector
5    !---------------------------------------------------------------------------
6 
7    implicit none
8 
9    type (iv_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 (trace_use_dull) call da_trace_entry("da_calculate_grady_profiler")
16 
17    do n=1, iv%info(profiler)%nlocal
18       do k=1, iv%info(profiler)%levels(n)
19          if (iv%profiler(n)%u(k)%qc < obs_qc_pointer) then
20             re%profiler(n)%u(k) = 0.0
21          end if
22          if (iv%profiler(n)%v(k)%qc < obs_qc_pointer) then
23             re%profiler(n)%v(k) = 0.0
24          end if
25 
26          jo_grad_y%profiler(n)%u(k) = -re%profiler(n)%u(k) &
27             / (iv%profiler(n)%u(k)%error * iv%profiler(n)%u(k)%error)
28          jo_grad_y%profiler(n)%v(k) = -re%profiler(n)%v(k) &
29             / (iv%profiler(n)%v(k)%error * iv%profiler(n)%v(k)%error)
30       end do
31    end do 
32    
33    if (trace_use_dull) call da_trace_exit("da_calculate_grady_profiler")
34 
35 end subroutine da_calculate_grady_profiler
36 
37