
integer n(6)
real*4, allocatable ::  px(:), py(:), pz(:)

open(1, file='halo_000.bin', form='UNFORMATTED', access='STREAM')
read(1) n
print *, n
ngas = n(1)
allocate(px(ngas))
allocate(py(ngas))
allocate(pz(ngas))

read(1) (px(i),py(i),pz(i), i=1, ngas)
!print *, px(1),py(1),pz(1)
do i=1,n(1)
write(2,*)px(i),py(i),pz(i)
enddo

end
