program OW_rand

use sep

implicit none
real			:: o1,o2,d1,d2
integer			:: n1,n2
real,allocatable		:: refl(:,:)

call sep_init()
call sep_begin_prog()

call from_history("n1",n1); call from_history("d1",d1); call from_history("o1",o1)
call from_history("n2",n2); call from_history("d2",d2); call from_history("o2",o2)

call to_history("n1",n1); call to_history("d1",d1); call to_history("o1",o1)
call to_history("n2",1); call to_history("d2",1.); call to_history("o2",0.)
call to_history("n3",n2); call to_history("d3",d2); call to_history("o3",o2)
call to_history("eout",4);call to_history("label3","")

allocate(refl(n1,n2))
call random_number(refl);refl=2*refl-1
call srite("out",refl,4*n1*n2)
deallocate(refl)
call sep_end_prog()
end program
