C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LDM_GET_PHIX     **
C**************************
C
C
CD-Doc:
C PHIX             SUBROUTINE LDM_GET_PHIX (IPACK, VALUE, IFLAG, ND, 
C                 +                         IERR, ERRSTR)
CD-end
      SUBROUTINE LDM_GET_PHIX (IPACK, VALUE, IFLAG, ND, IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Get value of pack dependent real parameter PHIX
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      INTEGER IPACK
      REAL VALUE
      INTEGER IFLAG
      INTEGER ND
      INTEGER IERR
      CHARACTER*(*) ERRSTR

C  IPACK     (R)   Pack number (explicit)
C  VALUE     (W)   Returns PhiX missetting angle in degrees
C  IFLAG     (W)   Flag = -1 undefined value
C                       =  0 default value
C                       =  1 value set explicitly
C                       =  2 value set globally
C  ND        (W)   Number of decimal places for print (- if E format)
C  IERR      (W)   Error flag = 0 OK
C                             =-1 Invalid pack number
C  ERRSTR    (W)   Error string if error found
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      CALL LDM_CHK_GPK (IPACK, IERR, ERRSTR)
      IF (IERR.NE.0) RETURN
      VALUE = PHIX(IPACK)
      IFLAG = IS_PHIX(IPACK)
      ND = ND_PHIX(IPACK)
      IF (ND.EQ.-1000) ND = 3
      RETURN
      END
