<div dir="ltr"><div>That looks like fortran unformatted sequential format, not flat binary.  Confirm by seeing if the first four bytes are 00 00 09 00, the same as the last four bytes that you showed.  This would be the record size as a little-endian 4-byte integer, which would be correct for this format.  This would also explain the 8-byte difference.</div><div><br></div><div>Read in NCL with fbinrecread, not cbinread.  Please see the function docs and follow the prototype.</div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 9, 2020 at 12:34 PM Rick Brownrigg via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Well I don't think you want to read it as double, particularly not if you are certain the dimensions are 384x384. I'm wondering if you can safely ignore that last 8 bytes (and ignore the warning).  A quick plot would reveal whether the data seem reasonable or definitely misaligned.</div><div><br></div><div>RB<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 9, 2020 at 12:14 PM Debasish Hazra <<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto">Thanks Rick.Should I read it as double?</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 9, 2020 at 1:39 PM Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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:</div><div><br></div><div> 00 00 00 00 00 00 09 00   <br></div><div><br></div><div>Do you have reason to believe the data is not being read correctly, or are you mostly concerned about the warning message?</div><div><br></div><div>BTW - the data are mostly zeros. <br></div><div><br></div><div>Rick</div><div><br></div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 9, 2020 at 11:09 AM Debasish Hazra via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"></blockquote></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>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.</div><div><br></div><div> setfileoption("bin","readbyteorder","littleendian")</div><div> d1 = cbinread("./Test/modelout.dat",(/4,384,384/),"float")</div><div><br></div><div>warning:cbinread: The size implied by the dimension arrays is less that the size of the file.<br> Only the first 589824 contiguous bytes of the file will be read in.<br>Note dimensions and values may not be aligned properly</div><div><br></div><div>Any help on this is appreciated.</div><div>Thanks</div><div>Debasish</div></div></blockquote></div></blockquote></div></div></blockquote></div></blockquote></div></div>