; this procedure returns linearly interpolated intermediate ; values from an OGSE array storing a list of values of a dependent ; variable; the desired location is that for the value of the ; independent variable input. ; ............................................ pro ogseinterp,index,x,arrayxy,y,z,zz if (x lt arrayxy(0,0)) then begin y=arrayxy(1,0) z=arrayxy(2,0) zz=arrayxy(3,0) endif if (x gt arrayxy(0,index-1)) then begin y=arrayxy(1,index-1) z=arrayxy(2,index-1) zz=arrayxy(3,index-1) endif for i=0,index-2 do begin if ((x ge arrayxy(0,i)) and (x le arrayxy(0,i+1))) then begin y=((x-arrayxy(0,i+1))*arrayxy(1,i)+(arrayxy(0,i)-x)*arrayxy(1,i+1))/(arrayxy(0,i)-arrayxy(0,i+1)) z=((x-arrayxy(0,i+1))*arrayxy(2,i)+(arrayxy(0,i)-x)*arrayxy(2,i+1))/(arrayxy(0,i)-arrayxy(0,i+1)) zz=((x-arrayxy(0,i+1))*arrayxy(3,i)+(arrayxy(0,i)-x)*arrayxy(3,i+1))/(arrayxy(0,i)-arrayxy(0,i+1)) endif endfor return end