g95: reading more data than the record size (RECL)
- From: ssheriff <ssheriff3@xxxxxxxxx>
- Date: Fri, 11 Apr 2008 13:56:27 -0700 (PDT)
I am trying to recompile some old .for code with g95. The binary runs
fine, but I need to make the arrays larger. When I compile (g95 -o
a.exe b.for) the program runs until it gags on reading an
'unformatted' file:
here's the code:
open(unit=12, file=zbot_file, form='unformatted', status='old')
call read_write(0, 12, id, ny, nx, y0, dy, x0, dx, zbot)
***
subroutine read_write(mode, lun, id, ncol, nrow, col1, delcol,
&row1, delrow, array)
dimension array(1), work(1000)
character id*56
character pgm*8
read(unit=lun) id, pgm, ncol, nrow, nz, col1, delcol, row1,
delrow
The last line above is the one for which it says:
UNIT 12 "100USGS.grd " Fortran runtime error: Reading more data
than the record size (RECL)
The record length, in another program that transforms files, appears
to be 128, and I tried that with recl=128, but get the same messages.
Any tips on how to get around this?
TIA
.
- Follow-Ups:
- Re: reading more data than the record size (RECL)
- From: Kurt Kallblad
- Re: g95: reading more data than the record size (RECL)
- From: glen herrmannsfeldt
- Re: reading more data than the record size (RECL)
- Prev by Date: Re: Passing Array-valued functions TO procedures
- Next by Date: Re: Passing Array-valued functions TO procedures
- Previous by thread: Passing Array-valued functions TO procedures
- Next by thread: Re: g95: reading more data than the record size (RECL)
- Index(es):
Relevant Pages
|
|