program OW_stdev

use sep

implicit none
real			:: med,std
integer			:: n1,n3
real,allocatable		:: velin(:)

call sep_init()
call sep_begin_prog()

call from_history("n1",n1)
call from_history("n3",n3)

allocate(velin(n1*n3));velin=0
call sreed("in",velin,4*n1*n3)
med=sum(velin)/(n1*n3)
std=sqrt(sum((velin-med)**2)/(n1*n3))
write(0,*) "med = ",med, " std = ",std, maxval(velin),minval(velin)
deallocate(velin)
call sep_end_prog()
end program
