c-----------------------------------------------------------------------
c     Routine to convert from global array coordinates to local 
c     array coordinates
c-----------------------------------------------------------------------
      integer function getindx(loc, lb, stride )
      implicit none
      
      integer   loc, lb, stride
      
      getindx = (loc - lb)/stride + 1
      return
      end