SUBROUTINE SPLINE (X,Y,M,XINT,YINT,ATER) 



SEE PENNINGTON REF. FOR DESCRIPTION OF THIS SUBROUTINE 



DIMENSION X(1),Y(1),C(4,53) 



K=0 



IF(X(l)+Y(M)+Y(M-l)+X(M-l)+Y(M-2)-ATER) 10,3,10 



10 CALL SPLICO (X,Y,M,C) 



ATER= X(l)+Y(M)+Y(M-l)+X(M-l)+Y(M-2) 

 K=l 



3 IF(ABS(XINT-X(1)).LT. 0.00001) GO TO 1 

 IF(XINT-X(1)) 70,1,2 



70 K=l 



GO TO 7 



1 YINT=Y(1) 

 RETURN 



2 IF(ABS(XINT-X(K+1)).LT. 0.00001) GO TO 4 

 IF(XINT-X(K+1))6,4,5 



4 YINT=Y(K+1) 

 RETURN 



5 K=K+1 



IF(M-K) 71,71,3 



71 K=M-1 

 GO TO 7 



6 IF (ABS(XINT-X(K)).LT. 0.00001) GO TO 12 

 IF(XINT-X(K))13,12,11 



12 YINT=Y(K) 

 RETURN 



13 K=K-1 

 GO TO 6 



11 YINT=(X(K+1)-XINT)*(C(1,K)*(X(K+1)-XINT)**2+C(3,K)) 

 YINT=YINT+(XINT-X(K))*(C(2,K)*(XINT-X(K))**2+C(4,K)) 

 RETURN 



7 PRINT lOl.XINT 

 7 CONTINUE 



101 FORMATC CAUTION VALUE AT POSITION ' ,F 10. 2, 'WAS EXTRAPOLATED') 

 GO TO 11 



RETURN 

 END 



167 



