C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_SETI_PK      **
C**************************
C
C
      SUBROUTINE LDM_SETI_PK (IPACK, PAR, IS_PAR, CH_PAR, 
     +                        IVAL, MAXPK)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set values for a pack based integer param (for LDM_SET.. routines)
C
C ***** 'LDM' SERVICE ROUTINE ONLY *****
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IPACK
      INTEGER MAXPK
      INTEGER PAR(MAXPK)
      INTEGER IS_PAR(MAXPK)
      INTEGER CH_PAR(MAXPK)
      INTEGER IVAL

C  IPACK     (R)   Pack number, 0=all packs
C  PAR       (W)   Array containing parameter values to be set
C  IS_PAR    (W)   Array containing IS flags to be set
C  CH_PAR    (W)   Array containing CH flags to be set
C  IVAL      (R)   Value to be set
C  MAXPK     (R)   Packs array dimension
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
C
C====== LOCALS:
C
      INTEGER I
C
C-------------------------------------------------------------------------------
C
      IF (IPACK.EQ.0) THEN
         DO 100 I = 1, MAXPK
            PAR(I) = IVAL
            IS_PAR(I) = 2
            CH_PAR(I) = CH_MASK
100      CONTINUE
      ELSE        
         PAR(IPACK) = IVAL
         IS_PAR(IPACK) = 1
         CH_PAR(IPACK) = CH_MASK
      END IF
      RETURN
      END
