Re: error reading a large number of binary files [message #53691 is a reply to message #53600] |
Wed, 25 April 2007 13:32   |
Mark Branson
Messages: 9 Registered: May 2006
|
Junior Member |
|
|
** UPDATE ON MY PROBLEM STATUS **
I decided to reprocess the original grib files with wgrib again but
this time with the -nh switch turned on, which eliminates the f77-
style header record. Then in the IDL read routine I just had to turn
off the /f77_unformatted switch. Well, this has worked flawlessly in
the numerous tests I have tried -- not a single error!!!
That made me wonder if my problem was with IDL reading ANY fortran-
style binary files, or just the ones created by wgrib. So I wrote a
fortran-90 program to generate roughly the same size and number of
binary files but just writing random numbers to the files, and then a
simple readbin.pro IDL routine. Sure enough, it crashes in random
places just like my previous set of ECWMF binary files with f77
headers did. Here's some sample output from a few trials -- these
random number file are just named x001.bin, x002.bin, ..., x520.bin.
>>> x062.bin
>>> x063.bin
>>> x064.bin
% READU: Corrupted f77 unformatted file detected. Unit: 100, File:
x064.bin
% Execution halted at: READBIN2 10 /Users/mark/Datasets/
era40/testbin/readbin2.pro
% $MAIN$
>>> x300.bin
>>> x301.bin
>>> x302.bin
>>> x303.bin
% READU: Corrupted f77 unformatted file detected. Unit: 100, File:
x303.bin
% Execution halted at: READBIN2 10 /Users/mark/Datasets/
era40/testbin/readbin2.pro
% $MAIN$
AND the problem seems to only occur once I make the files very large.
i.e., when i just wrote out 520 files of arrays of size 5, it flies
through all of those with no problems. I have no idea why that would
make a difference.
Thanks for the suggestions and ideas. You guys always think of things
to try that never occur to me.
Cheers,
Mark
|
|
|