CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

fortran77 help

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 11, 2007, 09:05
Default fortran77 help
  #1
khan
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

  Reply With Quote

Old   June 11, 2007, 12:18
Default Re: fortran77 help
  #2
MM
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 ...
  Reply With Quote

Old   June 11, 2007, 15:24
Default Re: fortran77 help
  #3
Lost in CFD
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.
  Reply With Quote

Old   June 12, 2007, 01:24
Default Re: fortran77 help
  #4
Markus Lummer
Guest
 
Posts: n/a
It works also in Fortran 90.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 22:00.