
      subroutine sigcl (eta,scou,lmax,ldim)
************************************************************************

c *** see R.H. Landau's program LPOTT, 1981
c
c     nb lmax must be variable

      implicit real*8 (a-h, o-z)

      dimension scou(ldim), ft(5)

c >>> FIRST EXECUTABLE STATEMENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      abeta = abs(eta)
      if (lmax.gt.ldim) lmax = ldim
      if (abeta-1.e-06) 10,10,30
 10   do 20 i=1,lmax
         scou(i) = 0.e0
 20   continue
      go to 100
 30   c = 1.e0/(eta*eta+2601.e0)
      ch = sqrt(c)
      theta = atan(eta/51.e0)
      do 40 m=1,5
         ft(m) = sin(theta*(2*m-1))
 40   continue
      sig2 = 50.5 * theta - eta * ( DLOG( ch ) + 1. )
      sig2 = sig2-ch*(ft(1)/12.-c*(ft(2)/360.-c*(ft(3)/1260.-c*(ft(4)/
     11680.-c*ft(5)/1188.))))
      lmax1 = 100-lmax
      if (lmax1) 70,70,50
 50   do 60 i=1,lmax1
         l = 101-i
         sig2 = sig2-atan(eta/l)
 60   continue
 70   lmax1 = lmax1+2
      scou(lmax) = sig2-atan(eta/lmax)
      if (lmax1-100) 80,80,100
 80   do 90 i=lmax1,100
         l = 101-i
         scou(l) = scou(l+1)-atan(eta/l)
 90   continue
 100  continue
      return
c**  this program valid on ftn4 and ftn5 **
      end
