
C ----------------------------------------------------------------------------
C |                                                                          |
C |             LAUE SCALING MODULE (LSM) SERVICE ROUTINES                   |
C |                                                                          |
C ----------------------------------------------------------------------------


C LAST UPDATE:
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C**************************
C**     LSM_CHECK_MU     **
C**************************
C
C **** LSM SERVICE ROUTINE ONLY ****
C
      INTEGER FUNCTION LSM_CHECK_MU (IVALS, FVALS, IRTYP, NINP)
C
C Purpose: Check routine for ABSCOR_MU variable parameter
C
C Author:  John W. Campbell, Jully 1997
C
C Arguments:
C
      INTEGER IVALS(*)
      REAL FVALS(*)
      INTEGER IRTYP(*)
      INTEGER NINP

C IVALS  (R)  Array of integer values to be checked (ignore
C             elements unless IRTYP(i).EQ.1)
C FVALS  (R)  Array of real Values IRTYP(i).EQ.2)
C IRTYP  (R)  Array of element type flags. flag =1 for
C             integer, =2 for real
C NINP   (R)  No. of input values
C
C====== Parameter statements
C 

C
C====== GLOBALS:
C

C
C====== FUNCTION TYPES:
C
      INTEGER KDMSTR  
C
C====== LOCALS:
C
      INTEGER I
      INTEGER NPAIRS

C     INTEGER I          !Temp/loop variable
C     INTEGER NPAIRS     !Number of pairs of values input
C
C-------------------------------------------------------------------------------
      LSM_CHECK_MU = 0
      IF (NINP.LE.2) RETURN
      IF (MOD(NINP,2).NE.0) THEN
         LSM_CHECK_MU = 1
         CALL KDMF_SET_CHKERR (
     +        KDMSTR('Table must have an even number of values'), 40)
         RETURN
      END IF
      NPAIRS = NINP/2
      DO 10 I = 2, NPAIRS
         IF (FVALS(2*I-1).LE.FVALS(2*I-3)) THEN
            LSM_CHECK_MU = 1
            CALL KDMF_SET_CHKERR (
     +        KDMSTR('Lambda values must be in ascending order'), 40)        
            RETURN
         END IF
 10   CONTINUE
      RETURN
      END
