anchor.diff:  
       end subroutine set_friction_field
   
  +    logical function ghost_invalid(i,j,mx,my,nghost,mint)
  +        implicit none
  +        integer, intent(in) :: i,j,nghost,mint,mx,my
  +        logical :: inner, outer
  +
  +        inner = (i .gt. mint .and. i .lt. mx-mint+1) .and. &
  +                (j .gt. mint .and. j .lt. my-mint+1)
  +
  +        outer = (i .lt. 1-nghost) .or. (i .gt. mx+nghost) .or. &
  +                (j .lt. 1-nghost) .or. (j .gt. my+nghost)
  +
  +        ghost_invalid = (inner .or. outer)
  +    end function ghost_invalid
  +
   
       ! ==========================================================================
       !  read_friction_file - Reads an input file containing info on friction
       !    coefficients.
       ! ==========================================================================
       type(friction_file_type) function read_friction_file(path, file_type) result(file)
  -        
  +
           implicit none
   
           ! Path to file to be read in
  
positive.code:         ! Locals
          integer :: m,i,j,k
          real(kind=8) :: x, y
  
          if (variable_friction) then
              ! Set region based coefficients
              do m=1, num_friction_regions
                  do i=1 - num_ghost, mx + num_ghost
                      do j=1 - num_ghost, my + num_ghost                        
                          x = xlower + (i-0.5d0) * dx
                          y = ylower + (j-0.5d0) * dy
                          if (friction_regions(m)%lower(1) < x .and.   &
  
negative.code: !                             enddo
  !                         enddo
                  end select
  
              case default
                  stop "Unimplemented file type for friction files."
          end select
  
      end function read_friction_file
  
  end module friction_module
  