      SUBROUTINE GLATS(KHALF,COLRAD,WGT,WGTCS,RCS2)
      DIMENSION COLRAD( 21 ),WGT( 21 ),WGTCS( 21 ),RCS2( 21 )
      DOUBLE PRECISION COLRAD, EPS, SI, RK2, SCALE, PI, DRADZ, RAD,
     1 DRAD, P1, P2, PHI, W, X, SN, RC
      EPS=1.D-12
C     WRITE(6,101)
101   FORMAT ('0 I   COLAT   COLRAD     WGT', 12X, 'WGTCS',
     1 10X, 'ITER  RES')
      SI=1.D+00
      K2=2*KHALF
      RK2=K2
      SCALE=2.D+00/(RK2**2)
      K1=K2-1
      PI=DATAN(SI)*4.D+00
      DRADZ=PI/360.D+00
      RAD=0.D+00
      DO 1000 K=1,KHALF
      ITER=0
      DRAD=DRADZ
1     CALL POLY(K2,RAD,P2)
2     P1 =P2
      ITER=ITER+1
      RAD=RAD+DRAD
      CALL POLY(K2,RAD,P2)
      IF(DSIGN(SI,P1).EQ.DSIGN(SI,P2))GO TO 2
      IF(DRAD.LT.EPS)GO TO 3
      RAD=RAD-DRAD
      DRAD=DRAD*0.25D+00
      GO TO 1
3     CONTINUE
      COLRAD(K)=RAD
      PHI=RAD   *180.D+00/PI
      CALL POLY(K1,RAD,P1)
      X=DCOS(RAD)
      W=SCALE*(1.D+00-X*X)/(P1*P1)
      WGT(K)=SNGL(W)
      SN=DSIN(RAD)
      W=W/(SN*SN)
      WGTCS(K)=SNGL(W)
      RC=1./(SN*SN)
      RCS2(K)=SNGL(RC)
      CALL POLY(K2,RAD,P1)
      PRPHI = SNGL(PHI)
      PRCOL = SNGL(COLRAD(K))
C     WRITE(6,102) K, PRPHI, PRCOL, WGT(K), WGTCS(K), ITER, P1
102   FORMAT(1H ,I2,2X,F6.2,2X,F10.7,2X,E13.7,2X,E13.7,2X,I4,2X,D13.7)
1000  CONTINUE
C(DEBUGLINE) VERSION CREATED JULY 8 1982 BY J.SELA,NMC.
      RETURN
      END
