      subroutine MaxSlab(q,d,maxe,mine,n1,n2,mm,nn,dry)
c.....calculates maximum eta
      real*8 d(mm,nn),q(mm,nn)
      real*4 maxe(mm,nn), mine(mm,nn)
      real*8 holdit, dry
      
      do i = 1,n1
         do j = 1,n2
            if(q(i,j).GE.dry) then
              holdit = (q(i,j)-d(i,j))*100.0
c............. Maximum and Minimum Amp fields to output
              if(holdit.GE.maxe(i,j)) then
                   maxe(i,j) = holdit
              endif
              if(holdit.LE.mine(i,j)) then
                  mine(i,j) = holdit
              endif
            endif
         end do
      end do

      return
      end
