      SUBROUTINE DIMGT(LSR,LA,LR,LM,KTR,LRLMT)
C 
C     * DEC 03/93 - G. J. B.  - REVISE FOR TRUNCATIONS > 99 
C     * AUG 13/90 - M.LAZARE. - CALL XIT IF LR.LT.LM. 
C     * JUL 16/79 - J.D.HENDERSON 
C 
C     * COMPUTES ROW LENGTH INFORMATION FOR SPECTRAL ARRAYS.
C     * LSR(1,M),LSR(2,M) = FIRST WORD IN ROW M OF SPECTRAL,ALP ARRAYS. 
C 
C     * LRLMT WAS FORMERLY A 5 DIGIT NUMBER FORMED BY - 1000*LR+10*LM+KTR 
C     *       WHICH IS NO GOOD FOR LR/LM > 99
C
C     * LRLMT IS NOW FORMED AS FOLLOWS:
C
C       IF LRLMT < 100,000   THEN LRLMT =  1000*LR+10*LM+KTR 
C       IF LRLMT >  99,999   THEN LRLMT = 10000*LR+10*LM+KTR 
C
C     *  WHERE  LR = LENGTH OF FIRST SPECTRAL ROW.
C     *         LM = NUMBER OF SPECTRAL ROWS. 
C     *        KTR = TRUNCATION TYPE. 
C     * LA = TOTAL LENGTH OF SPECTRAL ARRAY (COMPLEX WORDS).
C     * INVALID TRUNCATION TYPE RETURNS WITH LA=0.
C 
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)
      INTEGER LSR(2,1)
C-------------------------------------------------------------------- 
C     * DECOMPOSE LRLMT INTO LR,LM,KTR. 
C
C     * CASE 1 - PREVIOUS VERSION OF LRLMT FOR TRUNCATIONS <= 99
C 
      IF ( LRLMT .LE. 99999 ) THEN

        LR=LRLMT/1000 
        LM=LRLMT/10-100*LR

      ELSE
C
C       * CASE 1 - NEW VERSION OF LRLMT FOR TRUNCATIONS > 99
C 
        LR=LRLMT/10000 
        LM=LRLMT/10-1000*LR

      ENDIF

      IF(LR.LT.LM)                         CALL XIT('DIMGT',-1) 
      KTR=MOD(LRLMT,10) 
      LA=0
C 
C    * RHOMBOIDAL TRUNCATION (KTR = 0). 
C 
  210 IF(KTR.NE.0) GO TO 310
      LSR(1,1)=1
      LSR(2,1)=1
      LMP=LM+1
      DO 250 M=2,LMP
      LSR(1,M)=LSR(1,M-1)+LR
      LSR(2,M)=LSR(2,M-1)+LR+1
  250 CONTINUE
      LA=LSR(1,LMP)-1 
      RETURN
C 
C     * TRIANGULAR TRUNCATION (KTR = 2).
C 
  310 IF(KTR.NE.2) RETURN 
      LSR(1,1)=1
      LSR(2,1)=1
      LMP=LM+1
      DO 350 M=2,LMP
      LSR(1,M)=LSR(1,M-1)+LR-(M-2)
      LSR(2,M)=LSR(2,M-1)+LR-(M-3)
  350 CONTINUE
      LA=LSR(1,LMP)-1 
      RETURN
      END
