module OW_grabvel_areal

use OW_type
use OW_parms_areal

implicit none

contains

subroutine owgrab_vel_areal(ixs,vel,vel1,ni)

integer						:: ni, ixs
real						:: vel(:,:),vel1(:,:)

! grab velocity in the workspace       

   ni=int(((ixs-1)*sog%xm%d+sog%xm%o+sog%sh%o-(padtraces+tapertr)*sog%sh%d-xmin)/sog%sh%d)+1.5
   vel1(:,:)=vel(:,ni:ni+kxm%n-1)
!   write(0,*) "##### ni #####", ni,ni+kxm%n-1
end subroutine
end module
