18 REAL FUNCTION sp(UU,VV)
29 REAL FUNCTION dd(UU,VV)
34 parameter(rad2d=180./3.14159)
36 IF (
sp(uu,vv).GT.0.0)
THEN
37 dd=amod(540.+ rad2d*atan2(uu,vv),360.)
46 REAL FUNCTION xlintr(X0,X1,Z,ZZ0,Z1)
54 ELSE IF (z.EQ.z1)
THEN
57 xlintr=x0+(x1-x0)*(z-zz0)/(z1-zz0)
65 REAL FUNCTION tpot (PP,TT)
72 tpot=(tt+273.13)*((1000./pp)**0.288)
79 REAL FUNCTION pt2t (PP,TT)
86 pt2t=tt*((pp/1000.)**0.288)
103 parameter(badat=-9999.0,p0=1013.3,fact=44308.0)
104 parameter(xpon=0.19028,cv2mb=1013.25/29.921)
115 altmb=p/(1.0-(0.0065*z/288.0))**5.256
128 REAL FUNCTION cvt2p(ALTIM,ELEV)
139 parameter(badat=-999.9,p0=1013.3,fact=44308.0)
140 parameter(xpon=0.19028,cv2mb=1013.25/29.921)
147 REAL ALTIM,ELEV,ALTMB
152 cvt2p=altmb*(1.0-(0.0065*elev/288.0))**5.256
162 zstd=fact*(1.0-(
cvt2p/p0)**xpon)
163 IF (abs(zstd-elev) .GT. 450.0)
cvt2p=badat
170 INTEGER FUNCTION julmin (KYEAR,IMO,MDATE,IHOUR,IMIN)
178 INTEGER LASTD (12),KYEAR,IMO,MDATE,IHOUR,IMIN
180 DATA lastd /0,31,59,90,120,151,181,
181 $ 212,243,273,304,334/
186 IF (mod(kyear,4) .EQ.0. and. imo.GT.2)
THEN
191 julmin=1440*idajul+60*ihour+imin
197 SUBROUTINE lgntrp(Y,X0,X1,X,Y0,Y1)
202 IF (x1.EQ.x0 .OR. x.EQ.x0)
THEN
204 ELSE IF (x.EQ.x1)
THEN
207 ratio = alog10(x/x0)/alog10(x1/x0)
208 y = y0 + ratio * (y1-y0)
215 REAL FUNCTION wndwt(X,Y,XOBS,YOBS)
229 dist=sqrt(xdif**2 + ydif**2)
231 IF (dist.LT.d2min) dist=d2min
233 wndwt=1.0/(dist**dtwt)
239 SUBROUTINE setint(IVALUE,IARRAY,NUM1,NUM2)
248 dimension iarray(nxgrd,nygrd)
257 SUBROUTINE setmat(VALUE,ARRAY,NUM1,NUM2)
266 dimension array(nxgrd,nygrd)
subroutine setmat(VALUE, ARRAY, NUM1, NUM2)
subroutine lgntrp(Y, X0, X1, X, Y0, Y1)
real function cvt2p(ALTIM, ELEV)
real function wndwt(X, Y, XOBS, YOBS)
integer function julmin(KYEAR, IMO, MDATE, IHOUR, IMIN)
real function xlintr(X0, X1, Z, ZZ0, Z1)
real function degdif(A1, A2)
real function pt2t(PP, TT)
real function altset(Z, P)
real function tpot(PP, TT)
subroutine setint(IVALUE, IARRAY, NUM1, NUM2)