da_transform_xtotpw.inc

References to this file elsewhere.
1 subroutine da_transform_xtotpw(grid)
2 
3    !---------------------------------------------------------------------
4    ! Purpose: weighted sum of vertical column
5    !---------------------------------------------------------------------
6 
7    implicit none
8    
9    type (domain),  intent(inout) :: grid
10 
11    integer :: i, j, k
12 
13    real    :: pw
14 
15    if (trace_use) call da_trace_entry("da_transform_xtotpw")
16 
17    do j=jts, jte
18       do i=its, ite
19          pw = 0.0
20          do k=kts, kte
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))
24          end do
25  
26          ! To convert the unit of PW to cm:
27          grid%xa%tpw(i,j) = 0.1*pw
28       end do
29    end do
30 
31    if (trace_use) call da_trace_exit("da_transform_xtotpw")
32  
33 end subroutine da_transform_xtotpw
34 
35