<div dir="ltr"><div>I speculate that IDL&#39;s &#39;read_binary&#39; reads files created by IDL&#39;s &#39;write_binary&#39;.<br><br></div>I think this is a special IDL data structure.<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 29, 2017 at 5:03 PM, Debasish Hazra <span dir="ltr">&lt;<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks Mary for looking in to it. I have find only one IDL file that read that data set and it is attahced.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Debasish.</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 29, 2017 at 5:28 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Debasish,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Kevin and I took a look at this. For starters, there *is* an error message coming out of your script:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default" style="font-size:small"><font face="monospace, monospace">warning:cbinread: The size implied by the dimension arrays is greater that the size of the file.</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> The default _FillValue for the specified type will be filled in.</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> Note dimensions and values may not be aligned properly</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you look at the size of the file, it doesn&#39;t match with the dimensions you&#39;re requesting:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Size of file = 8294400 bytes</div><br>Size of dimensions = 5 * 720 * 1440 * 4 (for a uint) = 20736000</div><div class="gmail_default"><br></div><div class="gmail_default">If this is truly a C binary file, it looks like it only has 2 * 720 * 1440 * 4 bytes.</div><div class="gmail_default"><br></div><div class="gmail_default">This doesn&#39;t really change the results, however, because you still get two strange looking plots.</div><div class="gmail_default"><br></div><div class="gmail_default">We tried several different things:</div><div class="gmail_default"><br></div><div class="gmail_default">1) reading the data as ubyte, int, and ushort</div><div class="gmail_default">2) reversing the array to 1440 x 720 x 2</div><div class="gmail_default">3) reading the data as little endian</div><div class="gmail_default">4) plotting the data as a simple contour plot to take out the map component.</div><div class="gmail_default"><br></div><div class="gmail_default">Nothing we did produced more information about the file, or produced better plots.</div><div class="gmail_default"><br></div><div class="gmail_default">Is there some documentation on this file to understand how it was written? For example, are you sure the &quot;uint&quot; type is correct? Are you sure the dimension sizes are correct? Why are the values so large? Is it possible that this is &quot;packed&quot; data, and that you need to use a function like dim_gbits to pick off individual bits of information?</div><div class="gmail_default"><br></div><div class="gmail_default">If you can find a C or Fortran code that was used to create this file, then it should be fairly straightforward to figure out how to read it.</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Mar 29, 2017 at 2:18 PM, Debasish Hazra <span dir="ltr">&lt;<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>&gt;</span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span><div dir="ltr"><div>Hi,</div><div><br></div><div><div>I am trying to read a binary file with the attached code, but  getting all empty fields in the figure with no apparent error message. Uploaded  the data file in the ftp server &quot;viirs_meandbdi_gridded_statis<wbr>2015048.dat&quot;. Any help with this is appreciated.</div><div><br></div><div>Thanks.</div><span class="m_6953690311967160673m_-5323660611070675753HOEnZb"><font color="#888888"><div>Debasish</div></font></span></div></div><div class="m_6953690311967160673m_-5323660611070675753HOEnZb"><div class="m_6953690311967160673m_-5323660611070675753h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 22, 2017 at 10:33 AM, Debasish Hazra <span dir="ltr">&lt;<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to read a binary file with the attached code, but  getting all empty fields in the figure with no apparent error message. Uploaded  the data file in the ftp server &quot;viirs_meandbdi_gridded_statis<wbr>2015002.dat&quot;. Any help with this is appreciated.</div><div><br></div><div>Thanks.</div><span class="m_6953690311967160673m_-5323660611070675753m_3158856751608814800HOEnZb"><font color="#888888"><div>Debasish.</div><div><br></div><div><br></div></font></span></div>
</blockquote></div><br></div>
</div></div><br></span>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>