      subroutine findkml(h,zml,lmax,kml) 
c
c   @(#)findkml.f	1.3 leonard walstad
c
c-----------------------------------------------------------------------
c
      dimension zml(lmax)
c
      kml=0
   10 continue
        kml=kml+1
        if (kml.ge.lmax) then
           write(*,*)'findkml: kml > lmax '
           stop
         endif
        dkml=-zml(kml)
        dkmlp1=-zml(kml+1)
      if (h.ge.dkmlp1) goto 10 
      return
      end
