29 use vrbls3d,
only: wh, uh, vh, zint, zmid
30 use masks,
only: lmh, dx, dy
31 use params_mod,
only: d00
32 use ctlblk_mod,
only: lm, jsta_2l, jend_2u, jsta_m, jend_m, &
33 global, spval, im, jm, &
34 ista_2l, iend_2u, ista_m, iend_m
35 use gridspec_mod,
only: gridtype
36 use upp_math,
only: dvdxdudy, ddvdx, ddudy
43 REAL,
PARAMETER:: HLOWER=2000., hupper=5000.
45 real :: r2dx, r2dy, dz, dcdx, dudy, dvdx
46 REAL :: HTSFC(ista_2l:iend_2u,jsta_2l:jend_2u),UPDHEL(ista_2l:iend_2u,jsta_2l:jend_2u)
48 INTEGER,
dimension(jm) :: IHE,IHW
59 CALL exch(uh(ista_2l,jsta_2l,l))
61 IF (gridtype ==
'B')
THEN
63 CALL exch(vh(ista_2l,jsta_2l,l))
86 htsfc(i,j) = zint(i,j,nint(lmh(i,j))+1)
93 IF (htsfc(i,j) < spval)
THEN
95 r2dx = 1./(2.*dx(i,j))
96 r2dy = 1./(2.*dy(i,j))
105 IF ( (zmidloc - htsfc(i,j)) >= hlower .AND. &
106 (zmidloc - htsfc(i,j)) <= hupper )
THEN
107 dz=(zint(i,j,l)-zint(i,j,l+1))
109 IF (wh(i,j,l) < 0)
THEN
119 CALL dvdxdudy(uh(:,:,l),vh(:,:,l))
123 IF (dvdx<spval.AND.dudy<spval.AND. &
124 wh(i,j,l)<spval.AND.dz<spval) &
125 updhel(i,j)=updhel(i,j)+(dvdx-dudy)*wh(i,j,l)*dz
127 IF (updhel(i,j) < -9e10 .OR. updhel(i,j) > 9e10)
THEN