1 SUBROUTINE DA_Transform_XToZTD_Lin( grid )
3 !------------------------------------------------------------------------
4 ! Purpose: to compute the Zenith Total Delay, and save it to grid%xa%ztd.
6 ! Yong-Run Guo 05/20/2008
7 !------------------------------------------------------------------------
11 type (domain), intent(inout) :: grid
15 real :: const, part, parta, term1, term2, wzd, hzd, zf
17 !--WEIGHTED SUM OF VERTICAL COLUMN
24 const = (grid%xb%hf(i,j,k+1)-grid%xb%hf(i,j,k)) / a_ew
25 part = grid%xb%p(i,j,k)*grid%xb%q(i,j,k) / grid%xb%t(i,j,k)
27 if ( consider_xap4ztd ) then
28 parta = (grid%xb%q(i,j,k)*grid%xa%p(i,j,k) + grid%xb%p(i,j,k)*grid%xa%q(i,j,k) &
29 - grid%xb%p(i,j,k)*grid%xb%q(i,j,k)*grid%xa%t(i,j,k) / grid%xb%t(i,j,k)) &
32 parta = ( grid%xb%p(i,j,k)*grid%xa%q(i,j,k) &
33 - grid%xb%p(i,j,k)*grid%xb%q(i,j,k)*grid%xa%t(i,j,k) / grid%xb%t(i,j,k)) &
36 term1 = parta * const * wdk1
37 term2 = (parta * const * wdk2 &
38 - part * const * wdk2 * grid%xa%t(i,j,k) / grid%xb%t(i,j,k)) &
40 wzd = wzd + term1 + term2
43 ! Hydrostatic delay (Saastamoinen 1972):
44 zf = (1.0 - zdk2*cos(2.0*grid%xb%lat(i,j)*radian) - zdk3*grid%xb%terr(i,j))
45 hzd = zdk1 * grid%xa%psfc(i,j) / zf
47 !-----To save the ZTD in cm to ztd:
48 grid%xa%ztd(i,j) = (wzd + hzd) * 1.e2
52 END SUBROUTINE DA_Transform_XToZTD_Lin