16 SUBROUTINE calupdhel(UPDHEL)
21 use vrbls3d, only: wh, uh, vh, zint, zmid
22 use masks, only: lmh, dx, dy
24 use ctlblk_mod
, only: lm, jsta_2l, jend_2u, jsta_m, jend_m, &
26 use gridspec_mod
, only: gridtype
27 use upp_math, only: dvdxdudy, ddvdx, ddudy
34 REAL,
PARAMETER:: hlower=2000., hupper=5000.
36 real :: r2dx, r2dy, dz, dcdx, dudy, dvdx
37 REAL :: htsfc(im,jsta_2l:jend_2u),updhel(im,jsta_2l:jend_2u)
39 INTEGER,
dimension(jm) :: ihe,ihw
50 CALL exch(uh(1,jsta_2l,l))
52 IF (gridtype ==
'B')
THEN
54 CALL exch(vh(1,jsta_2l,l))
77 htsfc(i,j) = zint(i,j,nint(lmh(i,j))+1)
84 IF (htsfc(i,j) < spval)
THEN
86 r2dx = 1./(2.*dx(i,j))
87 r2dy = 1./(2.*dy(i,j))
96 IF ( (zmidloc - htsfc(i,j)) >= hlower .AND. &
97 (zmidloc - htsfc(i,j)) <= hupper )
THEN
98 dz=(zint(i,j,l)-zint(i,j,l+1))
100 IF (wh(i,j,l) < 0)
THEN
110 CALL dvdxdudy(uh(:,:,l),vh(:,:,l))
114 updhel(i,j)=updhel(i,j)+(dvdx-dudy)*wh(i,j,l)*dz
dvdxdudy() computes dudy, dvdx, uwnd