      SUBROUTINE PRNMS2(SP,LSR,LM,LR,NPR,MPR,SCALE,NAME,A,PH,IA)
C 
C     * CCRN AUG 10/90 - F.MAJAESS (ALLOW HANDLING LARGE DIMENSIONS)
C     * CCRN FEV 27/85 - R.LAPRISE, B.DUGAS.
C     * PRINTS A 2-D (N,M) AMPLITUDE SPECTRUM GIVEN A GENERALIZED 
C     * SPECTRAL FIELD  SP,  FOR WAVENUMBER M=0,MPR-1 AND N=M,NPR-1 
C     *  NOTE THAT SCALE MUST BE SUCH THAT THE SCALED AMPL. FITS IN 
C     *       I6 FORMAT.
C 
C     * LEVEL 2,SP
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)
      COMPLEX SP(1) 
C 
      CHARACTER*25 FRMT 
      INTEGER LSR(2,1),IA(1)
      REAL A(LR), PH(LR)
C 
      DATA NOPPL/21/
C-----------------------------------------------------------------------
      NLIM=MIN(NPR,LR) 
      MPR=MIN(NPR,MPR) 
      MLIM=MIN(MPR,LM) 
C 
      NS=1
C 
  10  NF=MIN(NS+NOPPL-1,NLIM)
      WRITE(6,6000)NAME,SCALE,(        N-1, N=NS,NF)
C 
      MF=MIN(MLIM,NF)
C 
      DO 200 M=1,MF 
C 
        MS=M-1
        KLO=LSR(1,M)
        KHI=LSR(1,M+1) -1 
        LNT=KHI-KLO+1 
        NHI=MIN(NLIM,MS+LNT) 
        LNT=NHI-MS
        IF (LNT.LE.0) RETURN
        KLO=KLO+MAX((NS-MS-1),0) 
        LNT=MIN(NF-NS+1-MAX((MS-NS+1),0),NOPPL) 
C 
        CALL CARAP2(A,PH,  SP(KLO),LNT,KIND)
C 
C       * SCALE THE AMPLITUDES. 
C 
        DO 100 L=1,LNT
          IA(L)=INT(SCALE*A(L)) 
  100   CONTINUE
C 
C       * PRINT THE SPECTRUM.  FIRST PRINT WAVENUMBER MS, THEN SKIP 
C       * FROM N=0 TO  MS-1,   AND PRINT AMPL. FROM N=MS TO NLIM-1. 
C 
        IF (MS.GE.NS)   THEN
            WRITE(FRMT,6040) 6*(MS-NS+1),LNT
        ELSE
            WRITE(FRMT,6045) LNT
        ENDIF 
        WRITE(6,FRMT) MS,(IA(K), K=1,LNT) 
C 
  200 CONTINUE
C 
      NS=NS+NOPPL 
      IF(NS.LE.NLIM) GO TO 10 
C 
      RETURN
 6000 FORMAT('1',1X,A4,' * ',1PE14.6,' ====',//,1X,' M, N=',I3,20I6)
 6040 FORMAT('(/// ,1X,I3,1X,',  I3,'X,',  I2,'I6)') 
 6045 FORMAT('(/// ,1X,I3,1X,',  I7,'I6)') 
      END 
