C----------------------------------------------------------------------
C
C  THIS PROGRAM COMPUTES LUNAR AND PLANETARY EPHEMERIDES.
C  THE LUNAR EPHEMERIS IS COMPUTED AT ONE HOUR INTERVALS,
C  PLANETARY EPHEMERIS AT ONE DAY INTERVALS.
C  THE ORIGINAL PROGRAM STORES THE RESULTS INTO A BINARY FILE.
C  THIS  MODIFIED VERSION WRITES OUT ONLY A SMALL
C  FRACTION OF THE COMPUTED VALUES. THE TIME INTERVAL AND
C  INITIAL COORDINATES ARE GIVEN IN THE PROGRAM;
C  NO INPUT DATA IS NEEDED.
C  ALL WRITE STATEMENTS ARE OF THE FORM  WRITE (*, '(...)') ...
C
C
C  THE ORIGINAL PROGRAM WAS WRITTEN IN BURROUGHS EXTENDED ALGOL,
C  AND LATER CONVERTED TO VAX FORTRAN. 
C  IN THE FOLLOWING PROGRAM ALL NON-STANDARD FEATURES
C  (THERE WERE QUITE A FEW OF THEM) HAVE BEEN CHANGED TO
C  STANDARD FORTRAN77 STRUCTURES; ALSO, ALL GLOBAL ENVIRONMENTS,
C  PREVIOUSLY CONTAINED IN SEPARATE INCLUDE-FILES, HAVE BEEN
C  INSERTED INTO THE SOURCE. THESE MODIFICATIONS HOPEFULLY 
C  EXPLAIN SOME OF THE ODDITIES 
C
C
C----------------------------------------------------------------------
      PROGRAM  EPHEM
      INTEGER DAYNUM
      INTEGER D1,D2,NDAY1,NDAY2
C-old      PARAMETER(NDAY1=2000,NDAY2=6000)
      PARAMETER(NDAY1=1000,NDAY2=10000)
C
C  SET THE TIME INTERVAL
C  THE LUNAR EPHEMERIS IS COMPUTED FOR A PERIOD OF NDAY1
C  BEGINNING IN JANUARY 1, 1983.
C  THE PLANETARY EPHEMERIS IS COMPUTED FOR NDAY2 DAYS
C  TO CHANGE THE REQUIRED CPU-TIME, SIMPLY CHANGE NDAY1 OR NDAY2.
C  IF NDAY2 > 10000 YOU HAVE TO CHANGE ALSO MAXDAY
C  IN THE PARAMETER STATEMENTS IN SOME OTHER MODULES
C
      D1 = DAYNUM (1983,1,1)
C
      CALL INITIM(0)
      CALL INITIM(1)
      CALL INIT
      CALL SHOTIM(1)
      CALL INITIM(2)
      CALL MOON   (D1, D1+NDAY1)
      CALL SHOTIM(2)
      CALL INITIM(3)
      CALL PLANET (D1, D1+NDAY2)
      CALL SHOTIM(3)
      CALL SHOTIM(0)
      STOP
      END
