1 subroutine da_transform_xtotpw(grid)
3 !---------------------------------------------------------------------
4 ! Purpose: weighted sum of vertical column
5 !---------------------------------------------------------------------
9 type (domain), intent(inout) :: grid
15 if (trace_use) call da_trace_entry("da_transform_xtotpw")
21 pw = pw + (grid%xb%hf(i,j,k+1)-grid%xb%hf(i,j,k)) &
22 * (grid%xa%q(i,j,k)*grid%xb%rho(i,j,k) &
23 + grid%xb%q(i,j,k)*grid%xa%rho(i,j,k))
26 ! To convert the unit of PW to cm:
27 grid%xa%tpw(i,j) = 0.1*pw
31 if (trace_use) call da_trace_exit("da_transform_xtotpw")
33 end subroutine da_transform_xtotpw