Re: NCL cannot read binary data generated in Windows?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 11 Dec 2007 11:08:59 -0700 (MST)

Hi Xiucheng,

It sounds like maybe you have a version of NCL that doesn't have the
"setfileoption" procedure in it. This procedure was added in version
4.2.0.a033, which was released January 2006. Do you have at least
this version or a newer one (4.2.0.a033, 4.3.0, 4.3.1, or 5.0.0 should
work)?

--Mary

On Tue, 11 Dec 2007, Xiucheng Wang wrote:

> Hi,everyone,
> I generate a binary file "number.bin" in Windows XP,which contains 20 short integer numbers 1,2,3,4,...,20. Then I upload it to an IBM690 machine with AIX 5.11.
> If I use the following NCL program to read number.bin
> begin
> a=fbindirread("numberw.bin",0,(/2,2,5/),"short")
> print(a)
> end
> it will display the false results like this:
> Variable: a
> Type: short
> Total Size: 40 bytes
> 20 values
> Number of Dimensions: 3
> Dimensions and sizes: [2] x [2] x [5]
> Coordinates:
> (0,0,0) 256
> (0,0,1) 512
> (0,0,2) 768
> (0,0,3) 1024
> (0,0,4) 1280
> (0,1,0) 1536
> ...
> Then I modify the program like this:
> begin
> setfileoption("bin","ReadByteOrder","LittleEndian")
> a=fbindirread("numberw.bin",0,(/2,2,5/),"short")
> print(a)
> end
> then the program can not be built corecctly.That is the error information:
> fatal:syntax error: line 3 in file number.ncl before or near \n
> -----------------------------------------------------^
> fatal:syntax error: possibly an undefined procedure
> fatal:Syntax Error in block, block not executed
>
>
> who know how to read this binary data? Thanks a lot! The file "number.bin" is attached!
>
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 11 2007 - 11:08:59 MST

This archive was generated by hypermail 2.2.0 : Tue Dec 11 2007 - 14:19:21 MST