fortran/c interface problems?

Michael Fiorino Michael.Fiorino at NOAA.GOV
Mon Oct 16 13:29:09 EDT 2006


Barry,

if you write using, e.g.,

write(10) 2darray

then you need to add

option sequential

to your .ctl file,  f77 generally writes out 4-byte header/tailer around each write,  you'll need to write 2-d fields one at a time

/R Mike

Barry wrote:
> Hi all
>
> I am new so excuse me if someone has already asked this question;
> I have not gone through the index yet.
>
> I have written code to create my own binary data set in FORTRAN.
> When grads reads it to display the data, I get a zero value ADDED
> to my data so when I contour my field, it has a bullseye in it
> trying to draw for the zero. The zero is absolutely NOT on my
> data that I am writing out- I have double and triple checked this!
> When I plot a 3_D array, the zero moves around in a predictable manner.
>
> My feeling is that fortran writes binary files differently than C with
> an extra few bytes (header)- that grads, probably written in c,
> reads and interprets differently. Is there a  way around this that
> I failed to read about in the documentation?
>
> If anyone can help, it would be greatly appreciated.
> I like grads alot but I need to fix this to make it useful.
>
> Thanks,
>
> Barry



More information about the gradsusr mailing list