      SUBROUTINE ABQMAIN
C
C     PROGRAM AMP
CC---PROGRAM TO GENERATE AMPLITUDE FILES
      IMPLICIT REAL*8(A-H,O-Z)                       
C
      DIMENSION P2(27),P3(27),TIME(27)
C                         
      DATA P2/  30.0,  32.5,  35.0, 37.5, 40.0, 37.5, 35.0, 32.5, 
     1          30.0,  27.5,  25.0, 22.5, 20.0, 17.5, 15.0, 12.5, 
     2          10.0,   7.5,   5.0,  2.5,  0.0, -2.5, -5.0, -7.5, 
     3         -10.0, -12.5, -15.0 /
      DATA P3/   0.0,   0.0,   0.0,  0.0,  0.0,  2.5,  5.0,  7.5,
     1          10.0,  12.5,  15.0, 17.5, 20.0, 22.5, 25.0, 27.5,
     2          30.0,  32.5,  35.0, 37.5, 40.0, 42.5, 45.0, 47.5,
     3          50.0,  52.5,  55.0 /
C
      OPEN(UNIT=16,STATUS='NEW',FILE='ORNL3.AMP')
      OPEN(UNIT=17,STATUS='NEW',FILE='ORNL2.AMP')
C
      DO 100 I=1,27
         XI=I
         TIME(I)=XI/100.
         II=MOD(I,4)
         IF(II.NE.0) GO TO 100
         WRITE(17,99) TIME(I-3), P2(I-3), TIME(I-2), P2(I-2),
     1                TIME(I-1), P2(I-1), TIME(I),   P2(I)
         WRITE(16,99) TIME(I-3), P3(I-3), TIME(I-2), P3(I-2),
     1                TIME(I-1), P3(I-1), TIME(I),   P3(I)
         WRITE(6,90)  TIME(I-3), P2(I-3), TIME(I-2), P2(I-2),
     1                TIME(I-1), P2(I-1), TIME(I),   P2(I),
     2                TIME(I-3), P3(I-3), TIME(I-2), P3(I-2),
     3                TIME(I-1), P3(I-1), TIME(I),   P3(I)
   99    FORMAT(8(F10.6,','))
   90    FORMAT(3X,8F10.6)
  100 CONTINUE
C
      REWIND 17
      REWIND 16
C
      STOP
      END
