module OW_read

use sep
use OW_type
use OW_param

implicit none

complex,public,pointer				:: source(:,:,:),recv(:,:,:)
real,public,pointer				:: velint(:,:)

contains

subroutine owread(source,recv,velint)

complex,pointer					:: source(:,:,:),recv(:,:,:)
real,pointer					:: velint(:,:)

type (axis) 					:: kxm, h, w, x, xm, z, sh
type (dat_grid)					:: rec, sou
type (mod_grid)					:: img
type (velo)					:: v

!--------------------------------------------------
! Reading data

 allocate(recv(rec%h%n,rec%w%n,rec%x%n))
 allocate(source(sou%h%n,sou%w%n,sou%x%n))
 allocate(velint(v%z%n,v%xm%n))

 call sreed("sou",source,sou%h%n*sou%w%n*sou%x%n*8)
 call sreed("vel",velint,v%z%n*v%xm%n*4)
 call sreed("in",recv,8*rec%h%n*rec%w%n*rec%x%n)
write(0,*) "passei read 0 ",velint

end subroutine

end module
