Re: reading binary

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 14 2013 - 14:49:25 MST

What Mary says is possible.

Another possibility: the binary was created on (say) a big-endian
machine and you are reading on a little-endian machine:

Try
    setfileoption("bin","ReadByteOrder","BigEndian")
    u = fbinrecread (fili, 0, (/121, 5, 64,128/), "float")

or, vice versa

    setfileoption("bin","ReadByteOrder","LittleEndian")
    u = fbinrecread (fili, 0, (/121, 5, 64,128/), "float")

On 1/14/13 2:23 PM, Mary Haley wrote:
> Shinn,
>
> The current version of NCL expects a the initial record marker to be just 4 bytes. Some files have an 8 byte record marker. NCL can't currently handle 8-byte record markers, but in V6.1.1, we will have added a "setfileoption" option called "RecordMarkerSize" to allow you to specify this marker size.
>
> Could this be the case with your file? For a description of this issue, please see the "Caveat" at:
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/fbinrecread.shtml#Caveat
>
> --Mary
>
> On Jan 12, 2013, at 8:56 PM, Shinn Wong wrote:
>
>> Dear users,
>> I've got the model output in binary format (see the attached .ctl file) and would like to read it into ncl. I use the command fbinrecread:
>>
>> fili = "C:/Users/shinn/Desktop/tmptest/hiss.dta"
>> u = fbinrecread (fili, 0, (/121, 5, 64,128/), "float") ;
>>
>> but there is warning that the size specified is greater than the record size. I would like to know what is wrong with my code. Thanks in advance for any available helps.
>> Shinn
>> <hiss.ctl>_______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 14 14:49:48 2013

This archive was generated by hypermail 2.1.8 : Sat Jan 19 2013 - 10:23:16 MST