c kspectrum (http://www.meso-star.com/en_Products.html) - This file is part of kspectrum c Copyright (C) 2008-2015 - Méso-Star - Vincent Eymet c c This file must be used under the terms of the CeCILL license. c This source file is licensed as described in the file COPYING, which c you should have received as part of this distribution. The terms c are also available at c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt c subroutine lin_interp(x1,x2,x,f1,f2,f) implicit none c c Purpose: linear interpolation of quantity "f" between f1 and f2 c c Inputs: c + x1: absicca where f1 is given c + x2: absicca where f2 is given c + x : absiccas where f is interpolated c + f1: quantity f defined at x1 c + f2: quantity f defined at x2 c c Output: f is the quantity interpolated between f1 and f2 c double precision x1,x2,x,f1,f2,f f=f1+(f2-f1)/(x2-x1)*(x-x1) return end