module OW_io

implicit none





subroutine io_source(i4,i5,wav,source)

 integer					:: i4,i5
 complex, allocatable				:: source(:,:,:,:,:)
 type 
 call from_aux("n1",wav%xms%n); call from_aux("d1",wav%xms%d); call from_aux("o1",wav%xms%o)
 call from_aux("n2",wav%yms%n); call from_aux("d2",wav%yms%d); call from_aux("o2",wav%yms%o)  
 call from_aux("n3",wav%ws%n); call from_aux("d3",wav%ws%d); call from_aux("o3",wav%ws%o)
 call from_aux("n2",wav%xs%n); call from_aux("d2",wav%xs%d); call from_aux("o2",wav%xs%o)  
 call from_aux("n3",wav%ys%n); call from_aux("d3",wav%ys%d); call from_aux("o3",wav%ys%o)

 call sreed_window("source",5,(/wav%xms%n,wav%yms%n,wav%ws%n,wav%xs%n,wav%ys%n/),&
                  (/wav%xms%n,wav%yms%n,wav%ws%n,wav%xs%n,wav%ys%n/),(/0,0,0,i4-1,i5-1/),&
                  (/1,1,1,1,1/),8,source)


 call from_aux("source","n1",wav%n); call from_aux("source","d1",wav%d); call from_aux("source","o1",wav%o)

 call from_aux("vel","n1",vz%n); call from_aux("vel","d1",vz%d); call from_aux("vel","o1",vz%o)
 call from_aux("vel","n2",vx%n); call from_aux("vel","d2",vx%d); call from_aux("vel","o2",vx%o)

 call from_param("xmin", xm%o, vx%o)
 call from_param("xmax", xmax, vx%o+(vx%n-1)*vx%d)
 call from_param("nhpad", nhpad, 100)
 call from_param("zmax", zmax)
 call from_param("forward",forward,.false.)
