      subroutine hec_imp
c
c fill correspondence table for impact point (name to x,y values)
c
      implicit none
c
      include'hec_imp.inc'
c
c local variable
c
      character fname*19, ctag*2
      integer fnum, ios
      parameter (fnum=20, fname='hec_imp.dat')
      integer i
c
      call vzero(impact_point_x,impmax)
      call vzero(impact_point_y,impmax)
c
c read  file
c
      open (UNIT=fnum,IOSTAT=ios,ERR=100,FILE=fname,
     &                STATUS='OLD',
     &                ACCESS='SEQUENTIAL',FORM='FORMATTED')
c
c skip header and look for geometry table
c
      ctag = 'xx'
      do while (ctag .ne. 'ip')
         read(fnum,FMT='(a2)',IOSTAT=ios,ERR=100,END=300) ctag
      enddo
c
c read table
c
      do i = 1 , impmax
         read(fnum,FMT='(6x,1a,2I7)',IOSTAT=ios,ERR=100,END=300)
     &        impact_point_name(i),impact_point_x(i),impact_point_y(i)
c         print*,i,' ',impact_point_name(i),impact_point_x(i),
c     &          impact_point_y(i)
      enddo                                             
c
 300  continue
      close(fnum)
      print*,' *** impact points file read correctely'
      print*,'     number of impact points read: ', i - 1
      print*,' '
c
      return
c         
 100  continue
      close(fnum)               
      print *, ' *** error ',ios,' accessing impact points file'
      stop
c
      end
        



