- #1
jtibbitt
- 2
- 0
Hi. I need to be retrieve information far into a file without reading everything before it. Is there a way to do this? Current code is below.
Thanks,
Jeff Tibbitt
!ccccccccccccccccccccccccccccccccccccccc
program getcoord
integer i
real*4 xx(1000), yy(1000), zz(1000)
double precision x(1000,3)
! FILE
open(unit=56,file="tmp.dat",form='unformatted')
do i=1,50000
! GET 50000th SET OF COORDINATES
read(56) xx
read(56) yy
read(56) zz
enddo
close(56)
! CONVERT TO DOUBLE PRECISION
do i=1,1000
x(i,1)=xx(i)
x(i,2)=yy(i)
x(i,3)=zz(i)
enddo
end program
!cccccccccccccccccccccccccccccccccccccc
Thanks,
Jeff Tibbitt
!ccccccccccccccccccccccccccccccccccccccc
program getcoord
integer i
real*4 xx(1000), yy(1000), zz(1000)
double precision x(1000,3)
! FILE
open(unit=56,file="tmp.dat",form='unformatted')
do i=1,50000
! GET 50000th SET OF COORDINATES
read(56) xx
read(56) yy
read(56) zz
enddo
close(56)
! CONVERT TO DOUBLE PRECISION
do i=1,1000
x(i,1)=xx(i)
x(i,2)=yy(i)
x(i,3)=zz(i)
enddo
end program
!cccccccccccccccccccccccccccccccccccccc
Last edited: