      SUBROUTINE ld_gauscheb(usepts, success)

      INTEGER*4 usepts
      LOGICAL   success

      INCLUDE "params.inc"
      INCLUDE "gauscheb.cmn"

      REAL*8 pi / 3.14159 26535 89793 /

c
c
c------check calling argument
c
      IF (usepts .GT. max_gc_pts) GOTO 900
c
c
c------save it in common
c
      gcpts= usepts
c
c
c------unit conversion factor for quadrature.
c
      t_fac= (2.)*(12.)*(60.)*(60.)/pi
c
c
c------set up node points for Gauss-Chebyshev quadrature
c
      n= gcpts
      nscl= FLOAT(n)/pi
      DO i= 0,n-1
        y(i)= COS((2.*(i+1)-1.)/2./nscl)
      END DO

      success= .TRUE.
      RETURN

  900 CONTINUE
      WRITE(6,90) usepts, max_gc_pts
      success= .FALSE.
      RETURN

   90 FORMAT(' !!! ld_gauscheb !!! called with usepts=',i6/
     &   '          Note: gcpts must be at most ',i6)

      END
