 module print_mod

! (xs,is,xh,xm,z,t,v,wav,it0,npd)
!  Extrapolacao de onda acustica em meio 2D
!  por diferencas finitas 8a ordem em z,x
!
!   function u = sht_down_2t8x(xs,is,xh,z,t,v,wav,it0,npd)
!
! wav   vetor     nwav X 1
!  v    matriz    nx X nz
!  xs   vetor     nx X 1        --> shot positions
!  xh   vetor     nx X 1        --> offset vector
!  z    vetor     nz X 1 
!  t    vetor     nt X 1
!  npd  scalar    must be odd   --> # traces to be added on both sides
!  it0  scalar    must be odd 

 implicit none

  public :: print_init

  integer,private            			:: ns,nh,nxm,nz,nt,nwav,nwrk,nhpad,ixw
  real,private        				:: ds,dh,dxm,dz,dt,dwav,dwrk
  real,private        				:: os,oh,oxm,oz,ot,owav,owrk,kz2,kx2

 contains

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 subroutine print_init(ixw,xs,xh,xwrk,xm,z,t,wav,nhpad)

 type(axis),intent(in)			:: xs,xh,xm,z,t,wav
 type(axis)				:: xwrk
 integer,intent(in)			:: nhpad
 integer				:: ixw
 
 ns=xs%n;ds=xs%d;os=xs%o
 nh=xh%n;dh=xh%d;oh=xh%o
 nxm=xm%n;dxm=xm%d;oxm=xm%o
 nz=z%n;dz=z%d;oz=z%o
 nt=t%n;dt=t%d;ot=t%o
 nwav=wav%n;dwav=wav%d;owav=wav%o
 nwrk=xwrk%n;dwrk=xwrk%d;owrk=xwrk%o
 
 kx2=(t%d/xwrk%d)**2
 kz2=(t%d/z%d)**2

 write(0,*) "**************************************************"
 write(0,*) "***************** Parameters *********************"
 write(0,*) " "
 write(0,*) " ns = ",ns, " ds = ",ds," os = ",os
 write(0,*) " nt = ",nt, " dt = ",dt," nh = ",nh," dh = ",dh," oh = ",oh
 write(0,*) " nwav = ",nwav, " dwav = ",dwav," owav = ",owav
 write(0,*) " nwrk = ",nwrk," dwrk = ",dwrk," owrk = ",owrk," nvz = ",nz," dvz = ",dz," ovz = ",oz
 write(0,*) " nhpad = ", nhpad," nxm = "," ixw = ",ixw
 write(0,*) "**************************************************"


 end subroutine print_init
end module
