Re: write binary file

From: Andrew Mai <mai_at_nyahnyahspammersnyahnyah>
Date: Mon May 13 2013 - 09:54:27 MDT

On 05/13/2013 09:48 AM, cheryl Ma wrote:

> There is no error message. The variable should range from 0 to 100, but I got something like -9.0E30, 3E-20. I tried to set as
> liitle-endian or comment out this line, I still can't get the right values.

This sounds like an endian issue to me. On the other hand, it looks to me like you are doing everything correctly.

I would try writing it out in NCL as native (probably little-endian?) and reading it as native in the Fortran (take out the
"-byteswapio" flag).

Also, you should print out the max and min values in the NCL program right before you write out the Fortran records. Convince
yourself that the data really is in the range you think it is.

Andy
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 13 09:54:36 2013

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:19:28 MDT