anchor.diff:        subroutine geoclaw_interpolate2fine(mx,my,mbc,meqn,qcoarse,
  -     &      qfine,maux,aux_coarse,aux_fine,
  +     &      qfine,maux,aux_coarse,aux_fine,mbathy,
        &      p4est_refineFactor,refratio,igrid)
         implicit none
   
         integer mx,my,mbc,meqn,p4est_refineFactor,refratio
  -      integer igrid, maux
  +      integer igrid, maux,mbathy
         double precision qcoarse(meqn,1-mbc:mx+mbc,1-mbc:my+mbc)
         double precision qfine(meqn,1-mbc:mx+mbc,1-mbc:my+mbc)
         double precision aux_coarse(maux,1-mbc:mx+mbc,1-mbc:my+mbc)
  
positive.code:                         iff = (i-1)*refratio + ii
                          jf = (j-1)*refratio + jj
                          qf = qc + shiftx*gradx + shifty*grady -
       &                        aux_fine(19,iff,jf)
                          qfine(mq,iff,jf) = qf
                       enddo
                    enddo
  
negative.code:                         shifty = (jj - refratio/2.d0 - 0.5d0)/refratio
                          iff = (i-1)*refratio + ii
                          jf = (j-1)*refratio + jj
                          qfine(mq,iff,jf) =
       &                        qc + shiftx*gradx + shifty*grady
                       enddo
                    enddo
  
  cc                 # check to make sure we are not creating any new extrema
  c                  do ii = -1,1
  c                     do jj = -1,1
  c                        uc(ii,jj) = qcoarse(mq,ic+ii,jc+jj)/
  c     &                        qcoarse(1,ic+ii,jc+jj)
  c                     enddo
  c                  enddo
  c
  c                  coarseumax = -1d99
  c                  coarseumin = 1d99
  c                  do ii = -1,1
  c                     do jj = -1,1
  c                        coarseumax = max(coarseumax,uc(ii,jj))
  c                        coarseumin = min(coarseumin,uc(ii,jj))
  c                     enddo
  c                  enddo
  c
  c                  redefine = .false.
  c                  do ii = 1,refratio
  c                     do jj = 1,refratio
  c                        iff = (i-1)*refratio + ii
  c                        jf = (j-1)*refratio + jj
  c                        uf = qfine(mq,iff,jf)/qfine(1,iff,jf)
  c                        if (uf .gt. coarseumax .or. uf .lt. coarseumin)
  c     &                        then
  c                           redefine = .true.
  c                        endif
  c                     enddo
  c                  enddo
  c
  c                  if (redefine) then
  c                     do ii = 1,refratio
  c                        do jj = 1,refratio
  c                           iff = (i-1)*refratio + ii
  c                           jf = (j-1)*refratio + jj
  c                           qfine(mq,iff,jf) = qfine(1,iff,jf)*uc(0,0)
  c                        enddo
  c                     enddo
  c                  endif
  
                 endif
              enddo
  