c
c  %W%
c
        function find(x,xs,ys,npts)
c
c       designed to find ys(x) assuming x >= xs(1)
c
        dimension xs(npts),ys(npts)
        real interpp
c
        yval = interpp(x,xs,ys,npts,-1.e35,1.e35)
c
        if( abs(yval) .lt. 0.9e35)then
            find = yval
            return
        endif
c
c       need to extrapolate to find ys(x)
c
        deltay = ys(npts) - ys(npts-1)
        deltax = xs(npts) - xs(npts-1)
        change = x - xs(npts-1)
        find = ys(npts-1) + change*deltay/deltax
        return
        end
