C 
C *** AMPLITUDE FACTER OF MULTIPLE REFLECTION METHOD OF SH WAVE
C
      PROGRAM MSHML
C
C INPUT DATA  
C ** FOM    : FIRST CIRCULAR FREQUENCY ( OMEGA )
C ** DOM    : INCREMENT OF CIRCULAR FREQUENCY ( DELTA OMEGA )
C ** NOM    : TOTAL NUMBER OF CIRCULAR FREQUENCY
C ** MOM    : NOM IN MAIN PROGRAM DIMENSION
C           : IF MOM > 2**13(=8192), CAN NOT USE IN SUBROUTINE !!!
C ** DNS(I) : DENSITY OF Ith LAYER
C ** VS (I) : VS OF Ith LAYER
C ** DEP(I) : DEPTH ( THICKNESS ) OF Ith LAYER
C ** NL     : TOTAL NUMBER OF LAYERS
C ** ML     : NL IN MAIN PROGRAM DIMENSION
C ** THETA  : INCIDENT ANGLE OF SH WAVE ( RADIAN )
C OUTPUT DATA  
C ** AMP(I) : AMPLITUDE FACTER ON SURFACE OF Ith OMEGA ( (I-1)*DOM+FOM )
C ** SPCA(I): SPECTRUM AMPLITUDE OF AMP(I)
C
      PARAMETER(ML=30,MOM=32800)
      DIMENSION DNS(ML),DEP(ML),VS(ML),QF(ML),SPCA(MOM)
      COMPLEX*8 AMP(MOM)
C
      CALL SOILIN(FOM,DOM,NOM,DNS,VS,DEP,QF,NQF,NL,ML,THETA,NSF)
      CALL SBSHML(FOM,DOM,NOM,MOM,DNS,VS,DEP,QF,NQF,NL,ML,THETA,NSF,AMP)
      CALL SPCOUT(FOM,DOM,NOM,MOM,AMP)
C
      DO 100 I=1,NOM
      SPCA(I)=CABS(AMP(I))
  100 CONTINUE
      CALL SPAPLT(FOM,DOM,NOM,MOM,SPCA)
C
      STOP
      END
