anchor.diff:  !                             enddo
   !                         enddo
                   end select
  -            
  +
               case default
                   stop "Unimplemented file type for friction files."
           end select
  -        
  +
       end function read_friction_file
   
   end module friction_module
  
positive.code:         integer :: m, file_type
          character(len=128) :: line
  
          if (.not.module_setup) then
  
              ! Open data file
              if (present(path)) then
                  call opendatafile(unit,path)
              else
                  call opendatafile(unit,'friction.data')
              endif
  
              ! Basic switch to turn on variable friction
              read(unit,*) variable_friction
              read(unit,'(a)')
  
              if (variable_friction) then
                  ! Region based friction
                  read(unit,'(i2)') num_friction_regions
                  allocate(friction_regions(num_friction_regions))
                  read(unit,*)
                  do m=1,num_friction_regions
                      read(unit,*) friction_regions(m)%lower
                      read(unit,*) friction_regions(m)%upper
                      read(unit,'(a)') line
                      allocate(friction_regions(m)%depths(get_value_count(line)))
                      read(line,*) friction_regions(m)%depths
                      read(unit,'(a)') line
                      allocate(friction_regions(m)%manning_coefficients(get_value_count(line)))
                      read(line,*) friction_regions(m)%manning_coefficients
                      read(unit,*)
                  enddo
  
                  ! File based friction
                  read(unit,"(i2)") num_friction_files
                  allocate(friction_files(num_friction_files))
                  do m=1,num_friction_files
                      read(unit,"(a,i1)") line, file_type
  
                      ! Open and read in friction file
                      print *,"*** WARNING *** File based friction specification unimplemented."
                      friction_files = read_friction_file(line, file_type)
                  enddo
              endif
  
              close(unit)
  
              module_setup = .true.
          end if
  
      end subroutine setup_variable_friction
  
      ! ==========================================================================
      !  set_friction_field - 
      ! ==========================================================================
      subroutine set_friction_field(mx, my, num_ghost, num_aux, xlower, ylower, &
                                    dx, dy, aux)
  
          use geoclaw_module, only: sea_level
  
  
negative.code:             ! Assumes a uniform rectangular grid of data values.
              case(1)
                  stop "Unimplemented file type for friction files."
  
              ! ================================================================
              ! ASCII file with header followed by z data
              ! (progressing from upper left corner across rows, then down)
  