anchor.diff:        double precision aux_fine(maux,1-mbc:mx+mbc,1-mbc:my+mbc)
   
         integer i,j, ig, jg, ic_add, jc_add, ii, jj, ifine, jfine
  -c     # Here, assume that meqn is equal to 3 
         double precision etasum, hsum, husum, hvsum, etaav, hav
         double precision hc, huc, hvc
         double precision hf, huf, hvf, bf, etaf
  
positive.code: 
        r2 = refratio * refratio
  
  c      # We haven't set capacity yet, mcapa = 0
        if (mcapa .eq. 0) then
           capac=1.0d0
        else
  c         capac=alloc(iaddcaux(i,j))
           endif
  
  c        # First loop over quadrant (i1,i2)x(j1,j2) of the coarse grid
        do j = 1,my/p4est_refineFactor
           do i = 1,mx/p4est_refineFactor
              i1 = i+ic_add
  
negative.code:                enddo          
              if (nwet.gt.0) then
                 etaav=etasum/dble(nwet)
                 hav=hsum/dble(nwet)
  c              hc=max(etaav-bc*capac,0.d0) !tsunamiclaw method
                 hc=min(hav,(max(etaav-
       &             aux_coarse(mbathy,i1,j1)*capac,0.d0)))
  c               huc=(min(hav,hc)/hsum)*husum
  c               hvc=(min(hav,hc)/hsum)*hvsum
                 huc=(hc/hsum)*husum
                 hvc=(hc/hsum)*hvsum
              else
                 hc=0.d0
                 huc=0.d0
  