subroutine akim(n) c c 6/1/99 - subroutine modified by tim marchok to replace calls c to csakm and csval with a call to scsint since the c ibm scientific library (essl) does not contain c either csakm or csval. scsint is a cubic spline c interpolation subroutine. c use setparms c parameter (imx=95, jmx=1, kmax=18, lgi=20 , np = 26) common /gdinf/ ngd,ngr,ntr,dt,js,jn,ie,iw,iimax,imax,jjmax, * jmax,nstflg,icx,icy,ihx,ihy,dftx,dfty cc common /sm/ crw(np),rc(np),vc(np),r(imx),vcr(imx),wc(imx) ctm common /poly/ c(4,np) ctm dimension break(np) real coeff(n,4) c vcr = 0.0 initflag = 0 if (kind(rc) == real_single .and. kind(crw) == real_single) then call scsint (rc,crw,coeff,n,initflag,r,vcr,imx) else if (kind(rc) == real_double .and. kind(crw) == real_double) &then call dcsint (rc,crw,coeff,n,initflag,r,vcr,imx) endif ctm call csakm(n,rc,crw,break,c) ctm ctm do 10 i = 1 , imx ctm do 5 ir = 1 , n-1 ctm if(r(i).lt.rc(ir).or.r(i).gt.rc(ir+1))go to 5 ctm d = r(i) - rc(ir) ctm vcr(i) = csval(r(i),n-1,break,c) ctm go to 10 ctm5 continue ctm10 continue return end