2022-02-07 09:45:08 +11:00
|
|
|
program genbloubs
|
|
|
|
|
|
|
|
use bloubspace
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
character(200) :: filename
|
|
|
|
integer, parameter :: idu = 33
|
|
|
|
integer :: i, compte, errcode
|
|
|
|
type(t_bloubs) :: bloub
|
|
|
|
|
|
|
|
! parsing command line
|
|
|
|
i = IARGC()
|
|
|
|
if (1 .ne. i) then
|
|
|
|
STOP ' :BAD COMMAND LINE'
|
|
|
|
endif
|
|
|
|
call getarg(1, filename)
|
|
|
|
|
|
|
|
write (0, '(A, A)') "*** exporting from ", trim(filename)
|
|
|
|
|
|
|
|
open(unit=idu, file=trim(filename), form='unformatted', &
|
|
|
|
iostat=errcode, &
|
|
|
|
action='read', status='old')
|
|
|
|
|
|
|
|
if (0 .ne. errcode) then
|
|
|
|
! print *, 'errcode ', errcode
|
|
|
|
STOP " : CAN'T OPEN FILE " // trim(filename)
|
|
|
|
endif
|
|
|
|
|
|
|
|
compte=0
|
|
|
|
do
|
|
|
|
read (unit=idu, iostat=errcode) bloub
|
|
|
|
if (0 .ne. errcode) then
|
|
|
|
exit
|
|
|
|
endif
|
2022-02-18 00:10:15 +11:00
|
|
|
print *, bloub%px, bloub%py, bloub%pz, bloub%radius, bloub%age
|
2022-02-07 09:45:08 +11:00
|
|
|
compte = compte + 1
|
|
|
|
enddo
|
|
|
|
|
2022-02-09 04:56:51 +11:00
|
|
|
write(0, '(1X, I8, A)') compte, " bloubs exported"
|
2022-02-08 12:53:49 +11:00
|
|
|
|
2022-02-07 09:45:08 +11:00
|
|
|
close(idu)
|
|
|
|
|
|
|
|
end program
|