C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_NDSET_PL     **
C**************************
C
C
      SUBROUTINE LDM_NDSET_PL (IPACK, IPLATE, ND_PAR, ND,
     +                         MAXPK, MAXPL)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set ND values for a plate based real parameter
C
C ***** 'LDM' SERVICE ROUTINE ONLY *****
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IPACK
      INTEGER IPLATE
      INTEGER MAXPK
      INTEGER MAXPL
      INTEGER ND_PAR(MAXPK,MAXPL)
      INTEGER ND

C  IPACK     (R)   Pack number, 0=all packs
C  IPLATE    (R)   Plate number, 0=all plates
C  ND_PAR    (W)   Array containing ND flags to be set
C  ND        (R)   Value to be set
C  MAXPK     (R)   Packs array dimension
C  MAXPL     (R)   Plates array dimension
C
C====== GLOBALS:
C

C
C====== LOCALS:
C
      INTEGER I
      INTEGER J
C
C-------------------------------------------------------------------------------
C
      IF (IPACK.EQ.0) THEN
         IF (IPLATE.EQ.0) THEN
            DO 100 I = 1, MAXPK
               DO 50 J = 1, MAXPL
                  ND_PAR(I,J) = ND
50             CONTINUE
100         CONTINUE
         ELSE
            DO 150 I = 1, MAXPK
                ND_PAR(I,IPLATE) = ND
150         CONTINUE
         END IF
      ELSE
         IF (IPLATE.EQ.0) THEN
            DO 200 J = 1, MAXPL
               ND_PAR(IPACK,J) = ND
200         CONTINUE
         ELSE
            ND_PAR(IPACK,IPLATE) = ND
         END IF
      END IF
      RETURN
      END
