1 subroutine da_transform_xtoztd(grid)
3 !------------------------------------------------------------------------
4 ! Purpose: to compute the Zenith Total Delay, and save it to xb%ztd.
6 ! Both of the wet and dry delay are computed based on Vedel and Huang,
7 ! J. Meteor. Soc., 82, 459-472, 2004.
9 ! ** Equation (3) in Vedel and Huang is wrong.
11 ! ported by Yong-Run Guo 05/12/2008 from wrf3dvar.
12 !------------------------------------------------------------------------
16 type (domain), intent(inout) :: grid
20 real :: const, part, term1, term2, wzd, hzd, zf
22 if (trace_use) call da_trace_entry("da_transform_xtoztd")
24 !--WEIGHTED SUM OF VERTICAL COLUMN
31 const = (grid%xb%hf(i,j,k+1)-grid%xb%hf(i,j,k)) / a_ew
32 part = grid%xb%p(i,j,k)*grid%xb%q(i,j,k) / grid%xb%t(i,j,k)
33 term1 = part * const * wdk1
34 term2 = part * const * wdk2 / grid%xb%t(i,j,k)
35 wzd = wzd + term1 + term2
38 ! Hydrostatic delay (Saastamoinen 1972):
39 zf = (1.0 - zdk2*cos(2.0*grid%xb%lat(i,j)*radian) - zdk3*grid%xb%terr(i,j))
40 hzd = zdk1 * grid%xb%psfc(i,j) / zf
42 !-----To save the ZTD in cm to ztd:
43 grid%xb%ztd(i,j) = (wzd + hzd) * 1.e2
47 end subroutine da_transform_xtoztd