|
[Sponsors] |
June 11, 2007, 09:05 |
fortran77 help
|
#1 |
Guest
Posts: n/a
|
I am using fortran 77 and looking for a function/subroutine which help me to generate many data files automatically to be used for animation. Now I am doing it manully but make me tired.
e.g i need to rename p.out as p1.out,.. p1.out ->p2.out ....pn-1 ->pn.out after every 5o iteration. any one can help me. thanks |
|
June 11, 2007, 12:18 |
Re: fortran77 help
|
#2 |
Guest
Posts: n/a
|
Use the following command:
write(filename,'(a3,i4.2,a4)')'RES',NUM,'.OUT' OPEN(2,FILE=filename) Write(2,*)... . . . Close(2) Just put the above in a loop while NUM is changed for each output file. You should make files such as: RES 1.OUT, RES 2.OUT and ... |
|
June 11, 2007, 15:24 |
Re: fortran77 help
|
#3 |
Guest
Posts: n/a
|
Can this syntax be applied to Fortran 90??
I've been opening several files, then open(50,.) open(51 open(52 ... do i=50,whatever asdfasdf write(i,*) end do this would make things much easier if I could use it in 90. |
|
June 12, 2007, 01:24 |
Re: fortran77 help
|
#4 |
Guest
Posts: n/a
|
It works also in Fortran 90.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fortran77 or 90 | hosseinhgf | CFX | 2 | November 26, 2010 02:02 |
How can I find a free Fortran77 numerical library? | Alberto | Main CFD Forum | 3 | January 21, 2008 01:56 |
Fortran77 or Fortran 90 | Swapnil | CFX | 2 | November 26, 2002 16:16 |