RE: [fluka-discuss]: source.f-read file
Hi again,
You can use the OAUXFI routine
CALL OAUXFI(FILENAME, IONUMBER, STATUS(NEW,OLD,UNKNOWN...), IERR)
e.g.
CALL OAUXFI('filename.dat', 21, 'OLD', IERR)
For me the most preferable way is to add an OPEN card in the input file
OPEN 21 OLD
filename.dat
then pass the unit as what(1) in SOURCE card in your input
SOURCE 21
and from the source.f you can get the unit
as iunit = NINT(WHASOU(1))
It allows you to modify the file/unit from the input without the need to recompile your source code.
Vasilis.
________________________________
From: owner-fluka-discuss_at_mi.infn.it [owner-fluka-discuss_at_mi.infn.it] on behalf of ãÆÔ¨ÁÖ [yanyuanlin_at_impcas.ac.cn]
Sent: 10 June 2014 05:27
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: source.f-read file
Dear FLUKA experts,
I'm using the source.f which will read a data file.But if the open(21,file=file's absolute path way),fluka can't run.If file=relative path way£¬where should I put the data file?
Best Wish!
Yanyuanlin
Received on Tue Jun 10 2014 - 11:02:00 CEST
This archive was generated by hypermail 2.3.0
: Tue Jun 10 2014 - 11:02:01 CEST