44 LOGICAL doadj,ifxpt(nxgrd,nygrd),isdop
45 REAL di(nxgrd,nygrd),u1(nxgrd,nygrd),v1(nxgrd,nygrd)
46 REAL un(nxgrd,nygrd),vn(nxgrd,nygrd),thk(nxgrd,nygrd)
47 REAL ustart(nxgrd,nygrd),vstart(nxgrd,nygrd)
48 DATA doadj, enfrac /.false.,0.5/
71 CALL setmat(0.0,di,ncol,nrow)
78 IF (la.GT.nlvl) la=nlvl
83 IF (htb.LT.-1.0) htb=-1.0
84 thk(i,j)=0.5*(hta-htb)*0.01
88 IF (thk(i,j).LE.0.01) thk(i,j)=0.01
99 un(i,j)=u1(i,j)*thk(i,j)
100 vn(i,j)=v1(i,j)*thk(i,j)
126 ue=0.5*(un(i+1,j)+un(i+1,j+1))
127 uw=0.5*(un(i,j) +un(i,j+1))
128 vso=0.5*(vn(i+1,j)+vn(i,j))
129 vno=0.5*(vn(i,j+1)+vn(i+1,j+1))
133 cuij=0.05*gs*(ddij-di(i,j))*ra
134 cvij=0.05*gs*(ddij-di(i,j))*ra
138 IF (cuij .LT.-1.0) cuij=-1.0
139 IF (cuij .GT. 1.0) cuij=1.0
140 IF (cvij .LT.-1.0) cvij=-1.0
141 IF (cvij .GT. 1.0) cvij=1.0
143 un(i+1,j)=un(i+1,j)+cuij
144 un(i+1,j+1)=un(i+1,j+1) +cuij
145 un(i,j)=un(i,j) -cuij
146 un(i,j+1)=un(i,j+1) -cuij
147 vn(i+1,j)=vn(i+1,j)-cvij
149 vn(i,j+1)=vn(i,j+1)+cvij
150 vn(i+1,j+1)=vn(i+1,j+1)+cvij
170 IF (i.EQ. nint(xdop(jd)) .AND.
171 $ j.EQ. nint(ydop(jd))) isdop=.true.
174 IF (l.EQ.levbot(i,j) .OR. isdop)
THEN
176 $ adjmax*(un(i,j)-ustart(i,j))
178 $ adjmax*(vn(i,j)-vstart(i,j))
180 ELSE IF (l.GT.levbot(i,j))
THEN
184 adjless=adjmax+(1.0-adjmax)*
185 $ (rhs(i,j,l)-rhs(i,j,levbot(i,j)))/
186 $ (rhs(i,j,nlvl)-rhs(i,j,levbot(i,j)))
189 $ adjless*(un(i,j)-ustart(i,j))
191 $ adjless*(vn(i,j)-vstart(i,j))
210 IF (rhs(i,j,l).GT.0.0 )
THEN
211 un(i,j)=un(i,j)/thk(i,j)
212 vn(i,j)=vn(i,j)/thk(i,j)
213 u1(i,j)=u1(i,j)-un(i,j)
214 v1(i,j)=v1(i,j)-vn(i,j)
230 IF (rhs(i,j,l) .GT.0.0)
THEN
246 w(i,j,l)=
dubyou(un(i,j),vn(i,j),i,j,l)
subroutine setmat(VALUE, ARRAY, NUM1, NUM2)
subroutine fixwnd(IFXPT, LVL)
real function dubyou(UT, VT, I, J, K)