      subroutine SKALE(ARRAY,AXLEN,NPTS,INC,ARYSIZ)
      integer ARYSIZ
      real ARRAY(ARYSIZ),AXLEN
      real DIST,DUMMY,RN,Z,ZMAX,ZMIN,ZMINP
      integer I,INC,NPTS,IFAULT
      include 'UNITS.INC'
      ZMIN = ARRAY(1)
      ZMAX = ARRAY(1)
      do 100 I = 2, NPTS, INC
         Z = ARRAY(I)
         if (Z.gt.ZMAX) ZMAX = Z
         if (Z.lt.ZMIN) ZMIN = Z
100   continue
      RN = aint(AXLEN)
      if (ZMIN.eq.ZMAX) then
         ZMIN = ZMIN-0.1*ZMIN
         ZMAX = ZMIN+0.1*ZMIN
      endif
      if (RN.le.1.0) RN = 2.0
      call SKALE2 (ZMIN,ZMAX,RN,ZMINP,DIST,DUMMY,IFAULT)
      if (IFAULT.gt.0) write (TTYOUT(MACHNO),5000)
5000  format (' Improper input to Subroutine SKALE2.')
      if (IFAULT.gt.0) return
      ARRAY(NPTS+1) = ZMINP
      ARRAY(NPTS+2) = DIST
      return
      end
