subroutine interp(nk_ti,nu_ti,k_ti,nu,kf,k) implicit none include 'max.inc' integer nk_ti,i,kf double precision nu_ti(1:Npmx) double precision k_ti(1:Npmx) double precision nu,k do i=1,nk_ti if (nu_ti(i).eq.nu) then k=k_ti(i) kf=1 goto 666 endif if (nu_ti(i).gt.nu) then goto 111 endif enddo if (nu.gt.nu_ti(nk_ti)) then kf=0 goto 666 endif 111 continue if (i.gt.1) then k=k_ti(i-1)+(k_ti(i)-k_ti(i-1))/(nu_ti(i)-nu_ti(i-1)) & *(nu-nu_ti(i-1)) kf=1 else write(*,*) 'Error from routine interp:' write(*,*) 'i=',i stop endif 666 continue return end