updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_ssmi / da_transform_xtozrhoq.inc
blob4b798c4f705f6b726b6f66602b75029434d4c988
1 subroutine da_transform_xtozrhoq(xb, i, j, zh, zf, zrhom)
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
7    implicit none
8    
9    integer,        intent(in)      :: i, j
10    type (xb_type), intent(in)      :: xb         ! first guess state.
11    real,           intent(out)     :: zrhom      ! gridded height weighted moisture
12    real,           intent(in)      :: zh(mkz)
13    real,           intent(in)      :: zf(mkz+1)
15    integer                         :: k
17    if (trace_use) call da_trace_entry("da_transform_xtozrhoq")
18    
19    zrhom = 0.0
21    do k = 1,mkz
22       zrhom = (zf(k)-zf(k+1))*zh(k)*(xb%q(i,j,k)*xb%rho(i,j,k))+zrhom
23    end do
25    if (trace_use) call da_trace_exit("da_transform_xtozrhoq")
27 end subroutine da_transform_xtozrhoq