c    @(#)harvpt.f	1.1
c
c
c
      subroutine harvpt(b,m,n,fac)
c
c --- b = field for which data is to be printed
c --- m = no of points along a side of that array
c---- n= no of points along a merdional side of that array
c --- fac = scale factor
c
c --- this subroutine takes an mxm field of data (array b) and
c --- interpolates it onto a 17x17 field of data (array a). the
c --- interpolated array always includes the outside edges.
c
      common/unit/iin,iout,idff,idif,iorr,iowr,iplt,ifndd
      common/user/pram(16)
      dimension a(17,17),b(m,n),ix(17,17)
      do 100 i=1,17
        lli=float((m-1)*(i-1))/16.+.99999
        llip1=lli+1
        if(lli.eq.0)lli=1
        dil=float((i-1)*(m-1))/16.-float(lli-1)
        dir=1.-dil
        do 90 j=1,17
          llj=float((n-1)*(j-1))/16.+.99999
          lljp1=llj+1
          if(llj.eq.0)llj=1
          djl=float((j-1)*(n-1))/16.-float(llj-1)
          dju=1.-djl
          a(i,j)=(dir*b(lli,llj)+dil*b(llip1,llj))*dju
     /           +(dir*b(lli,lljp1)+dil*b(llip1,lljp1))*djl
          ix(i,j)=fac*a(i,j)+sign(0.5,a(i,j))
          if(ix(i,j).gt.9999999)ix(i,j)=9999999
          if(ix(i,j).lt.-999999)ix(i,j)=-999999
   90   continue
  100 continue
      do 110 j=17,1,-1
        write(iout,105,err=110) (ix(i,j),i=1,17)
  105   format(1x,17i7)
  110 continue
      return
      end
