module pathtime
  implicit none
  real   ,private,dimension(:,:),pointer:: glocs
  integer:: ntr
  real:: gz
contains
subroutine pathtime_init(glocs_i,ntr_i,gz_i) 
 real,dimension(:,:),pointer  :: glocs_i 
 integer    :: ntr_i,
 real::gz_i

 ntr=ntr_i
 glocs=>glocs_i
 gz=gz_i
 
end subroutine pathtime_init
!----------------------------------------------------------------
integer function pathtime_lop(adj,add,modl,dat)
  logical,            intent(in)::adj,add
  real,             dimension(:)::        modl,dat
  real:: lx,ly,lz,lt,path

  pathtime_lop=1
  if (adj) then
     do itr=1,ntr
        
  else
     do itr=1,ntr
        lx=modl(2)-head(2,itr)+head(2,1)
        ly=modl(1)-head(1,itr)+head(1,1)
        lz=modl(3)-gz
        path=sqrt(lx*lx + ly*ly + lz*lz)
        dat(itr)=-modl(4)+path/modl(5)
     end do

