anchor.diff:       &    tc0,mfgridvars2(ng),q,nvar,mx,my,mbc,dx,dy,nvar,xlowmbc,
        &    ylowmbc,maux,aux,ioutarrivaltimes(ng),ioutsurfacemax(ng),1)
            endif
  +         
  +c        # RJL: Modified 8/20/11 
  +c        # If levelcheck > 0 then update max/mins at end of step on this grid.
  +c        # Note that if there are finer grids then fgridoften will not have been updated
  +c        # properly yet by those grids.  This modification allows checking max/min more
  +c        # frequently than the original code (equivalent to levelcheck==0) when you know
  +c        # what level is most relevant for this fixed grid.  Note also that if there are no
  +c        # grids at levelcheck overlapping a portion of the fixed grid then the max/min values 
  +c        # will be updated only at start of next level 1 step.
  + 
  +         levelcheck = 1 
  +         if (level .eq. levelcheck) then
  +         if (ioutsurfacemax(ng)+ioutarrivaltimes(ng).gt.0) then
  +           i0=i0fg2(ng)
  +         call fgridinterp(fgridoften(i0),xlowfg(ng),ylowfg(ng),
  +     &    xhifg(ng),yhifg(ng),dxfg(ng),dyfg(ng),mxfg(ng),myfg(ng),
  +     &    tc0,mfgridvars2(ng),q,nvar,mx,my,mbc,dx,dy,nvar,xlowmbc,
  +     &    ylowmbc,maux,aux,ioutarrivaltimes(ng),ioutsurfacemax(ng),2)
  +          endif
  +          endif
   
   
         endif
  
positive.code:          endif
  
  c        # set maxima or minima if this is a new coarse step
           if (tc0.ge.tcfmax) then
           if (ioutsurfacemax(ng)+ioutarrivaltimes(ng).gt.0) then
             i0=i0fg2(ng)
           call fgridinterp(fgridoften(i0),xlowfg(ng),ylowfg(ng),
  
negative.code: c     # needed there.
  
        tcom = time
        
        level = node(nestlevel,mptr)
  
        if (dump) then
           write(*,*)" dumping grid ",mptr
  