c $Header: /usr/people/flittner/radtran/tomrad/pv2.2/src/RCS/geopro.f,v 2.22 2000/08/30 16:38:09 flittner Exp $ subroutine geopro(x) c c********************************************************************** cccc c subroutine geopro c c version aug 22,1977 c c purpose c c compute extrapolated value of argument c c method c c using last three iterated values of argument, a geometric c series approx. is used to compute extrapolated terms. c c calling sequence c c call geopro(x) c c variable type i/o description c -------- ---- --- ----------- c c x(4) r*8 i/o argument to be extrapolated c x(1),x(2),x(3) contain last three c iteration values of argument to be c extrapolated. extrapolated term is c stored in x(4) c c external references c none c c common areas referenced c none c c analysis and programming c k.f. klenk p.m. smith sasc, aug 22 1977 c c modifications (date name purpose) c c last modified 11/18/92 bye zia ahmad c fixed the overflow problem c cccc c********************************************************************** c implicit none c passed real*8 x(4) c local real*8 a,b,c c a=x(3)-x(2) b=x(2)-x(1) c = dabs(b-a) if (c .gt. 1.0d-9) then x(4) = x(2) + a*b/(b-a) else x(4) = x(3) endif return end