Reading files in fortran



Hi

I have generated a data file which stores the array 'press'. I am
trying to read this file in another fortran code. When I tried to read
the file 'press' it gave me the following error.
----------------------------------------------------------
PGFIO-F-225/list-directed read/unit=55/lexical error-- unknown token
type.
File name = press formatted, sequential access record = 1
In source file f/2d.Linux.PGI.PGI.MPI/PROB_2D.f, at line number 1419
----------------------------------------------------------

I generated the data file as follows
----------------------------------------------------------
open (55, file='press')
..
..
..
write (55,*) press(i+2,j+2)
----------------------------------------------------------

I am reading the file 'press' into an array called press
----------------------------------------------------------
open(55,file='press')
..
..
..
read(55,*) press
----------------------------------------------------------

Please let me know, what shall I do

Thanks
.



Relevant Pages

  • Re: oocalc does not directly import .dat files
    ... > First row contains the first array, second row contains second array, ... gnuplot supports plotting only columns. ... > So now I have to find a software which will transpose the data file. ... > thought oocalc can do it. ...
    (Debian-User)
  • Re: Counting the Dates
    ... So you start reading the data file, adding up all the values that fall on ... you should have an array that has the total value for January ... the data has already been loaded into a DataArray() ... store the totals in a separate location so that I can reference them ...
    (microsoft.public.vb.general.discussion)
  • oocalc does not directly import .dat files
    ... First row contains the first array, second row contains second array, ... But if I want to visualize this data using gnuplot (my favorite plotting ... So now I have to find a software which will transpose the data file. ... But my data files usually have a .dat ...
    (Debian-User)
  • Re: Get a color name from any RGB combination?
    ... I could sort the array before ... results in a worksheet sort, and it takes much longer to do. ... array created when 'Split'ing the data file into a variant aligns with the ... what users' potential objectives might be with both colour lists and colour ...
    (microsoft.public.excel.programming)
  • Re: Need Help deleting record from text file
    ... Who said you need to read an entire array into memory just to access a small portion of it? ... If you write the data in a suitable format you can later open the data file by reading just a relatively small header chunk and then read in the elements or the portion of data you require. ... How is using a database going to speed up that operation! ...
    (microsoft.public.vb.general.discussion)