      INTEGER FUNCTION INDEP(H,DEP,NP,MX)
C
C     FIND THE INDEX SUCH THAT H IS BETWEEN DEP(INDEX)
C     AND DEPWL(INDEX+1)
C
      IMPLICIT REAL*8 (A-H,O-Z)
      DIMENSION DEP(MX)
C
      INDEP=0
      NPM1=NP-1
      DO 70 L=1,NPM1
      IF(DEP(L+1) .GE. H) GO TO 90
   70 CONTINUE
C     
C     H IS .GT. DEP(NP)
C
      INDEP=NP
      GO TO 100
C
   90 CONTINUE
      INDEP=L
  100 CONTINUE
C
      RETURN
      END
