C
C *** OUTPUT OF LOVE WAVE PHASE AND GROUP VELOCITY AND 
C     AMPLITUDE SPECTRUM ON SCREEN
C
      SUBROUTINE LVOTN(DOM,NOM,MOM,ML,NL,VS
     *                ,CFOM,NCFOM,CC,NSMD,MMD,UU,ALK,NADD)
C
C ** INPUT DATA **
C DOM     : 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 ML      : NL IN MAIN 
C NL      : TOTAL NUMBER OF LAYERS           
C VS (I)  : VS OF Ith LAYER      
C CFOM(I) : CUT-OFF OMEGA OF Ith MODE LOVE WAVE
C NCFOM   : FINAL MODE
C CC(I,J) : LOVE WAVE PHASE VELOCITY OF Jth MODE AT Ith OMEGA
C NSMD    : OUTPUT START LOVE MODE OF LOVE WAVE
C MMD     : NMD IN MAIN PROGRAM DIMENSION
C UU(I,J) : GROUP VELOCITY OF Jth MODE LOVE WAVE AT Ith OMEGA
C ALK(I,J): AMPLITUDE SPECTRUM (AL/K) OF Jth MODE LOVE WAVE AT Ith OMEGA
C         : TO OBTAIN AN ACTUAL AL/K, MULTIPLY AL/K BY (-i)
C NADD    : =1: ADD FROM FIRST MODE TO FINAL MODE
C
      IMPLICIT REAL*8 (A-H,O-Z)
      DIMENSION CFOM(0:MMD),CC(MOM,0:MMD),UU(MOM,0:MMD),ALK(MOM,0:MMD)
     *         ,VS(ML)
C
      WRITE(*,1000)
      WRITE(*,1010)NCFOM
      IF(NADD.EQ.1)THEN
        WRITE(*,1020)NSMD
      ENDIF
 1000 FORMAT(/' From SUBROUTINE LVOT :')
 1010 FORMAT(/' Highest Mode of Cut-Off Omega =',I5)
 1020 FORMAT( ' DAMP of First Mode is DAMP adding'
     *        '   from First to Final Mode: First Mode =',I5)
C
      DO 100 MODE=NSMD,NCFOM
C
        WRITE(*,1100)MODE
        WRITE(*,1110)CFOM(MODE),VS(NL)
        WRITE(*,1120)
C
        IOMMAX=0
        ALKMAX=0.D0
        DO 110 IOM=1,NOM
          ALKI=DABS(ALK(IOM,MODE))
          IF(ALKI.GT.ALKMAX)THEN
          IOMMAX=IOM
          ALKMAX=ALKI
          END IF
  110   CONTINUE
C
        ICN=1
        DO 120 IOM=1,NOM
C
         OM=DOM*FLOAT(IOM)
         IF(OM.LT.CFOM(MODE))GOTO 120
         PER=6.2831853070D0/OM
         WRITE(*,1130)ICN,OM,PER,CC(IOM,MODE),UU(IOM,MODE)
     *               ,ALK(IOM,MODE),ALK(IOM,MODE)/ALK(IOMMAX,MODE)
         ICN=ICN+1
C
  120   CONTINUE
C
  100 CONTINUE
C
 1100 FORMAT(//' Love Mode =',I5)
 1110 FORMAT(' Cut-Off Omega =',F10.5,',  Phase and Group Vel. =',F9.3/)
 1120 FORMAT(' Num., Omega, Period, Phase Vel., Group Vel., Amp.spc*i'
     *       ,', Amp(Max=1)'/)
 1130 FORMAT(I4,2F8.3,F11.3,F12.3,1X,D12.4,F8.3)  
C
      WRITE(*,*)
C
      RETURN
      END
