CD-Routine: Individual Routines to Set LDM Parameter Values - LDM_SET_...
C These are the individual routines for setting LDM parameter values.
CD-end

CD-doc:
C As there are a large number of routines involved and as these routines 
C have very similar parameters, a general description of the parameters
C is given here and only the list of parameters is given with each
C individual subroutine.
C
C  General description of parameters for 'set' routines:
C
C  KEYWORD    c (R)  Full keyword string (upper case) (blank = all 
C                    parameters for LDM_RESET)
C  VALUE      r (R)  The real parameter value to be set 
C  IVAL       i (R)  The integer parameter value to be set
C  VALSTR     c (R)  A string containing the parameter value
C  SVAL()     r (R)  Values of the polynomial coefficients for Spatial
C                    distortion polynomial parameters; for single 
C                    coefficient put value in first element of the array.
C                    (if ICOEFF.EQ.0) dimension to at least LDM_MAXSPD)
C  IPACK      i (R)  Pack number or 0=all packs 
C                    (if relevant for the parameter)
C  IPLATE     i (R)  Plate number or 0=all plates 
C                    (if relevant for the parameter)
C  ICOEFF     i (R)  Coefficient no. if > 0, 0=all coefficients (Spatial
C                    distortion polynomial parameters)
C  IERR       i (W)  Error flag = 0 OK
C                               =-1 Invalid pack specification
C                               =-2 Invalid plate specification
C                               =-3 Invalid LDM keyword
C                               =-4 Invalid polynomial coefficient no.
C                               = 1 Invalid code/string or syntax error in
C                                   number
C                               = 2 Invalid value - must be >=0.0 (>=0)
C                               = 3 Invalid value - must be >0.0 (>0)
C                               = 4 Invalid value - must be <=0.0 (<=0)
C                               = 5 Invalid value - must be <0.0 (<0)
C                               = 6 Other out of range number
C  ERRSTR     c (W)  Returns string for error message if IERR is
C                    non-zero (max. 80 chars)
C
C Routines:
C
CD-end

C LAST UPDATE: 
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C****************************
C**     LDM_SET_CRYST      **
C****************************
C
C
CD-Doc:
C CRYStal          SUBROUTINE LDM_SET_CRYST (VALSTR, IERR, ERRSTR)
CD-end
      SUBROUTINE LDM_SET_CRYST (VALSTR, IERR, ERRSTR)
C
      INCLUDE 'implicit_none.finc'
C
C Purpose: Set Value of string parameter CRYSTAL
C
C Author:  John W. Campbell, June 1993
C
C Arguments:
C
      CHARACTER*(*) VALSTR
      INTEGER IERR
      CHARACTER*(*) ERRSTR

C  VALSTR    (R)   Crystal string
C  IERR      (W)   Error flag =0 OK
C                             =1 Invalid code or syntax error in string
C                             =2 Value must be >=0
C                             =3 Value must be >0
C                             =4 Value out of range (other)
C  ERRSTR    (W)   Error description string if error found
C
C====== GLOBALS:
C
      INCLUDE 'ldm_data.finc'
      EXTERNAL LDM_BDAT
C
C====== LOCALS:
C

C
C-------------------------------------------------------------------------------
C
      IERR = 0
      ERRSTR = ' '
      CRYST = VALSTR
      IS_CRYST = 1
      CH_CRYST = CH_MASK
      RETURN
      END
