      SUBROUTINE CALCNS3(RNS2LA,LSR,MINDEX,LM,LA)
C 
C     * NOV 03/03 - M.LAZARE. NEW VERSION WHICH USES "MINDEX" (LOCAL
C     *                       TO EACH NODE), TO DETERMINE THE LOCAL NODE
C     *                       VALUES FOR "RNS2LA".  
C     * JUL 14/92 - E.CHAN.   PREVIOUS VERSION CALCNS2.
C
C     * CALCULATES ARRAY (LENGTH LA) OF N*N+1 VALUES FOR SUBSEQUENT
C     * USE IN MODEL. SINCE THIS ARRAY IS INVARIANT DURING THE COURSE
C     * OF A MODEL SIMULATION, IT IS PRE-COMPUTED ONLY ONCE AT THE 
C     * BEGINNING OF A JOB.
C
      IMPLICIT REAL (A-H,O-Z),
     +INTEGER (I-N)
C
      INTEGER LSR(2,LM+1)
      INTEGER MINDEX(LM)
      REAL RNS2LA(LA)
C-------------------------------------------------------------------
      DO 300 M=1,LM 
        MS=MINDEX(M)-1
        KL=LSR(1,M) 
        KR=LSR(1,M+1)-1 
        DO 290 K=KL,KR
          NS=MS+(K-KL) 
          RNS2LA(K)=REAL(NS*(NS+1)) 
  290   CONTINUE
  300 CONTINUE
C
      RETURN
      END
