FW: Endian problem
P.Romero
romero619 at HOTMAIL.COM
Tue May 12 12:11:04 EDT 2009
Nevermind...
It was in the 'OPTIONS' settings for the control file:
OPTIONS sequential big_endian
Problem solved.
P.Romero
-----Original Message-----
From: P.Romero [mailto:romero619 at hotmail.com]
Sent: 2009-05-12 10:50 AM
To: 'GRADSUSR at LIST.CINECA.IT'
Subject: Endian problem
I *believe* I might have an endian problem...
Im working with a weather model (NOAA's wavewatch3) & its data on a
little-endian machine.
The raw source data from NOAA is only available in big-endian format.
So, I had to enable 'byte-swapping' on my machine, switching from
'little-endian' to 'big-endian' for 'unformatted IO'.
This was done in order for the IO routines within the model to work
correctly on my platform.
Anyway, this model also provides a post-processing routine that writes a
GrADS control & binary data file.
When I open the resulting ctl & data file in grads, everything looks fine,
but the data is completely off.
Im *guessing* this is because my version of grads is running in native
'little-endian' on my machine, but the grads binary file from the model
post-processor was written in big-endian, due to the 'byte-swapping' I
enabled.
Is there a reasonably easy way to somehow 'adjust' this binary file back
into little-endian?
Or, is it possible to force grads into 'big-endian' just for this specific
data source?
Please help,
Thanks,
P.Romero
More information about the gradsusr
mailing list