C     ***********************
C     *  SUBROUTINE INDATA  *
C     ***********************
C
      SUBROUTINE INDATA(SX1,SX2,SZ2,SX3,NES1,NES2,NES3,ND1,NCF,NF)
C
      IMPLICIT REAL*8(A-H,O-Z)
      DIMENSION SX1(ND1),SX2(ND1),SZ2(ND1),SX3(ND1),NCF(10),
     *          NES1(ND1),NES2(ND1),NES3(ND1)
      COMMON /FREQ/ FT,NO
     *       /CONS/ RT,VR,DV,FW,VS1,VS2,DN1,DN2,Q1,Q2
     *       / XZ / FX0(10),FZ0(10),DA(10),NFLT
     *       / NS / NS1,NS2,NS3
     *       / NE / NE1,NE2,NE3
     *       / GAUSS / NG / QF / NQF / RADPATN / NRAD
C
C     *****  READ DATA  *****
C
      READ(5,5000) (NCF(I),I=1,9),NF
      READ(5,5010) FT,NO,NG,NQF,NRAD
      READ(5,5020) DN1,VS1,Q1
      READ(5,5020) DN2,VS2,Q2
      READ(5,5030) RT,VR,DV,FW
      READ(5,5040) NFLT
      DO 100 N=1,NFLT
      READ(5,5050) FX0(N),FZ0(N),DA(N)
      DA(N)=DA(N)*0.01745329252D0
  100 CONTINUE
      READ(5,5060) NE1,NE2,NE3
      READ(5,5070) (NES1(I),I=1,NE1)
      READ(5,5070) (NES2(I),I=1,NE2)
      READ(5,5070) (NES3(I),I=1,NE3)
      READ(5,5080) NS1
      READ(5,5090) (SX1(I),I=1,NS1+1)
      READ(5,5080) NS2
      READ(5,5100) (SX2(I),SZ2(I),I=1,NS2+1)
      READ(5,5080) NS3
      READ(5,5090) (SX3(I),I=1,NS3+1)
C
C     *****  WRITE DATA  *****
C
      WRITE(6,6000) FT,NO,NG,NQF,NRAD
      WRITE(6,6010) VS1,VS2,DN1,DN2,Q1,Q2,RT,VR,DV,FW
      WRITE(6,6020) NFLT
      DO 200 N=1,NFLT
      WRITE(6,6030) N,DA(N),FX0(N),FZ0(N)
  200 CONTINUE
      WRITE(6,6040) NE1,NE2,NE3
      WRITE(6,6050) (NES1(I),I=1,NE1)
      WRITE(6,6060) (NES2(I),I=1,NE2)
      WRITE(6,6070) (NES3(I),I=1,NE3)
      WRITE(6,6080) NS1
      WRITE(6,6110) (SX1(I),I=1,NS1+1)
      WRITE(6,6090) NS2
      WRITE(6,6120) (SX2(I),SZ2(I),I=1,NS2+1)
      WRITE(6,6100) NS3
      WRITE(6,6110) (SX3(I),I=1,NS3+1)
C
      RETURN
C
 5000 FORMAT(10I3)
 5010 FORMAT(F10.0,4I5)
 5020 FORMAT(3F10.0)
 5030 FORMAT(4F10.0)
 5040 FORMAT(I5)
 5050 FORMAT(3F10.0)
 5060 FORMAT(3I5)
 5070 FORMAT(20I3)
 5080 FORMAT(I5)
 5090 FORMAT(5F10.0)
 5100 FORMAT(6F10.0)
C
 6000 FORMAT(///4X,'FT                      =',F10.5
     *         ,4X,'NUMBER OF FREQUENCY     =',I10/
     *         ,4X,'NUMBER OF GAUSS INTEG.  =',I10
     *         ,4X,'QUARITY FACTER (1=IN)   =',I10/
     *         ,4X,'RADIATION PATERN (1=OUT)=',I10)
 6010 FORMAT( //4X,'VS      (1)        =',F10.3
     *         ,4X,'VS      (2)        =',F10.3/
     *         ,4X,'DENSITY (1)        =',F10.5
     *         ,4X,'DENSITY (2)        =',F10.5/
     *         ,4X,'QF      (1)        =',F10.4
     *         ,4X,'QF      (2)        =',F10.4/
     *         /4X,'RISE TIME          =',F10.4
     *         ,4X,'RUPTURE VELOCITY   =',F10.3/
     *         ,4X,'DISPLACEMENT OF F. =',F10.4
     *         ,4X,'WIDTH OF FAULT     =',F10.3)
 6020 FORMAT( //4X,'NUMBER OF FAULT =',I5)
 6030 FORMAT(  /4X,'FAULT NUMBER       =',I10
     *         ,4X,'DIP ANGLE (RADIAN) =',F10.5/
     *         ,4X,'X0 OF THE FAULT    =',F10.3
     *         ,4X,'Z0 OF THE FAULT    =',F10.3)
 6040 FORMAT( //4X,'NUMBER OF OUTPUT ELMENT NE1,NE2 AND NE3 =',3I5/)
 6050 FORMAT(  ,4X,'S1 OUTPUT NUMBER =',15I3)
 6060 FORMAT(  ,4X,'B2 OUTPUT NUMBER =',15I3)
 6070 FORMAT(  ,4X,'S3 OUTPUT NUMBER =',15I3)
 6080 FORMAT(  /4X,'NUMBER OF S1 ELEM.( 5*X )     =',I5/)
 6090 FORMAT(  /4X,'NUMBER OF B2 ELEM.( 3*(X,Z) ) =',I5/)
 6100 FORMAT(  /4X,'NUMBER OF S3 ELEM.( 5*X )     =',I5/)
 6110 FORMAT(   4X,5F10.3)
 6120 FORMAT(   4X,3(2F10.3,3X))
C
      END
