1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
program test
implicit none
integer :: i, n, nrecl
real, dimension(:), allocatable :: dummy
n=105705
! format(a9,1x,105705(1x,f8.3))
nrecl=9+1+n*(1+8)
allocate (dummy(n))
do i=1,n
dummy(i)=10000.0*rand()
enddo
open(unit=20,file='output_noreclspec.dat',form='formatted')
write(unit=20,fmt='(a9,1x,105705(1x,f8.3))') "Longitude", (dummy(i),i=1,n)
close(unit=20)
open(unit=30,file='output_wreclspec.dat',form='formatted',recl=nrecl)
write(unit=30,fmt='(a9,1x,105705(1x,f8.3))') "Longitude", (dummy(i),i=1,n)
close(unit=30)
deallocate(dummy)
end program test |
Partager