da_transform_xtozrhoq_adj.inc

References to this file elsewhere.
1 subroutine da_transform_xtozrhoq_adj(xb, xa, i, j, zh, zf, adj_zrhom)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8    
9    integer,        intent(in)      :: i, j
10    type (xb_type), intent(in)      :: xb         ! first guess state.
11    type (x_type) , intent(inout)   :: xa         ! increment
12    real,           intent(in)      :: ADJ_zrhom  ! gridded height weighted moisture
13    real,           intent(in),  &
14                    dimension(mkz)  :: zh
15    real,           intent(in),  &
16                    dimension(mkz+1):: zf
17    integer                         :: k
18 
19    if (trace_use) call da_trace_entry("da_transform_xtozrhoq_adj")
20 
21    do k = 1,mkz
22       xa%rho(i,j,k) = (zf(k)-zf(k+1))*zh(k)*xb%q(i,j,k)*ADJ_zrhom   + xa%rho(i,j,k)
23       xa%q(i,j,k)   = (zf(k)-zf(k+1))*zh(k)*ADJ_zrhom*xb%rho(i,j,k) + xa%q(i,j,k)
24    end do
25 
26    if (trace_use) call da_trace_exit("da_transform_xtozrhoq_adj")
27  
28 end subroutine da_transform_xtozrhoq_adj
29 
30