da_calculate_grady_buoy.inc

References to this file elsewhere.
1 subroutine da_calculate_grady_buoy(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
14    
15    if (trace_use_dull) call da_trace_entry("da_calculate_grady_buoy")       
16 
17    do n=1, iv%info(buoy)%nlocal
18       if (iv%buoy(n)%u%qc < obs_qc_pointer) re%buoy(n)%u = 0.0
19       if (iv%buoy(n)%v%qc < obs_qc_pointer) re%buoy(n)%v = 0.0
20       if (iv%buoy(n)%t%qc < obs_qc_pointer) re%buoy(n)%t = 0.0
21       if (iv%buoy(n)%p%qc < obs_qc_pointer) re%buoy(n)%p = 0.0
22       if (iv%buoy(n)%q%qc < obs_qc_pointer) re%buoy(n)%q = 0.0
23 
24       jo_grad_y%buoy(n)%u = -re%buoy(n)%u / (iv%buoy(n)%u%error * iv%buoy(n)%u%error)
25       jo_grad_y%buoy(n)%v = -re%buoy(n)%v / (iv%buoy(n)%v%error * iv%buoy(n)%v%error)
26       jo_grad_y%buoy(n)%t = -re%buoy(n)%t / (iv%buoy(n)%t%error * iv%buoy(n)%t%error)
27       jo_grad_y%buoy(n)%p = -re%buoy(n)%p / (iv%buoy(n)%p%error * iv%buoy(n)%p%error)
28       jo_grad_y%buoy(n)%q = -re%buoy(n)%q / (iv%buoy(n)%q%error * iv%buoy(n)%q%error)
29    end do
30    
31    if (trace_use_dull) call da_trace_exit("da_calculate_grady_buoy")  
32      
33 end subroutine da_calculate_grady_buoy
34 
35