[ncl-talk] binary file

Rick Brownrigg brownrig at ucar.edu
Fri Oct 9 11:39:30 MDT 2020


Well, the math works out: 4x384x384=589824.  Further, the last 8 bytes of
that file do not look like valid floating point values. They are:

 00 00 00 00 00 00 09 00

Do you have reason to believe the data is not being read correctly, or are
you mostly concerned about the warning message?

BTW - the data are mostly zeros.

Rick


On Fri, Oct 9, 2020 at 11:09 AM Debasish Hazra via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Hi,
> I am trying to read binary file (attached in the email) through NCL and
> file size is 589832 bytes. I am reading it as float but it coming out to be
> 589824. I am not sure what needs to be done to read it.
>
>  setfileoption("bin","readbyteorder","littleendian")
>  d1 = cbinread("./Test/modelout.dat",(/4,384,384/),"float")
>
> warning:cbinread: The size implied by the dimension arrays is less that
> the size of the file.
>  Only the first 589824 contiguous bytes of the file will be read in.
> Note dimensions and values may not be aligned properly
>
> Any help on this is appreciated.
> Thanks
> Debasish
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201009/3a9f88f0/attachment.html>


More information about the ncl-talk mailing list