
c#######################################################################
 
      function chap(zeta)
c     chapman function is used when the solar zenith angle exceeds
c     75 deg.
c       interpolates between values given in, e.g., mccartney (1976).
      implicit real*4 (a-h,o-z)
      dimension y(22)
      data(y(i),i=1,22)/3.800,4.055,4.348,4.687,5.083,5.551,6.113,
     &     6.799,7.650,8.732,10.144,12.051,14.730,18.686,
     &     24.905,35.466,55.211,96.753,197.,485.,1476.,9999./
      do 11 i=75,97
      rm=i
      if(zeta.lt.rm) go to 12
   11 continue
   12 chap=y(i-75)+(y(i-74)-y(i-75))*(zeta-(rm-1.))
      end
