C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_DF_PID       **
C**************************
C
C
      SUBROUTINE LDM_DF_PID (IPACK, IERR, ERRSTR, MAXPK)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set default values for a pack id's (special case)
C
C ***** 'LDM' SERVICE ROUTINE ONLY *****
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IPACK
      INTEGER IERR
      CHARACTER*(*) ERRSTR
      INTEGER MAXPK

C  IPACK     (R)   Pack number, 0=all packs
C  IERR      (W)   Error flag = 0 OK
C                             =-1 Invalid pack specification
C  ERRSTR    (W)   Error string
C  MAXPK     (R)   Packs array dimension
C
C====== GLOBALS:
C
      INCLUDE 'ldm_defaults.finc'
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C
      INTEGER I
C
C-------------------------------------------------------------------------------
C
      CALL LDM_CHK_SPK (IPACK, IERR, ERRSTR)
      IF (IERR.NE.0) RETURN
      IF (IPACK.EQ.0) THEN
         DO 100 I = 1, MAXPK
            PID(I) = DF_PID + I - 1
            IS_PID(I) = DF_IS_PID
            CH_PID(I) = CH_MASK
100      CONTINUE
      ELSE        
         PID(IPACK) = DF_PID + IPACK - 1
         IS_PID(IPACK) = DF_IS_PID
         CH_PID(IPACK) = CH_MASK
      END IF
      RETURN
      END
