|
[Sponsors] |
October 16, 2002, 08:42 |
fortran
|
#1 |
Guest
Posts: n/a
|
hi could any one describe for me how can i append two data file.for example in my restart code i want data of restart program dont over right on the last data thanks
|
|
October 16, 2002, 11:06 |
Re: fortran
|
#2 |
Guest
Posts: n/a
|
This can be compiler dependent but I have generally found the following successful for a number of fortran 77 and 90 compilers:
Suppose you have a file called data.dat which is not empty. If you simply use open(**,file='data.dat') , where ** is your reference number to the file, and then write to the file all old data will be overwritten. To overcome this problem modify the open statement to read open(**,file='data.dat',ACCESS='APPEND') where ** is as before. Your old data should now be safe and the new data will follow it. Hope this works Rob |
|
October 17, 2002, 06:52 |
Re: fortran
|
#3 |
Guest
Posts: n/a
|
A caution - in the very beginning you should once open the file (not append access) and close the same. Otherwise you get a huge appended file. Your case is for restart.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 06:37 |
Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77 | hawk | Main CFD Forum | 1 | April 12, 2005 23:13 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 21:45 |
Fortran77 or Fortran 90 | Swapnil | CFX | 2 | November 26, 2002 16:16 |
Why Favoring Fortran over C/C++? | Zi-Wei Chiou | Main CFD Forum | 35 | September 26, 2001 10:34 |