<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 12px; font-family: Helvetica, sans-serif;">
<div>
<div>
<div>Hi Dave,</div>
<div><br>
</div>
<div>Thank you so much for the information. I was able to track down the file that has all of the descriptions I required, and am now working on reading it in using NCL!</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Dave Allured - NOAA Affiliate &lt;<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Wednesday, January 4, 2017 at 6:52 PM<br>
<span style="font-weight:bold">To: </span>&quot;Hughlett, Taylor M&quot; &lt;<a href="mailto:taylor.hughlett@uta.edu">taylor.hughlett@uta.edu</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>&quot;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&quot; &lt;<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>Re: [ncl-talk] Reading in .ieeer8 file and plotting it with NCL<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">Taylor,
<div><br>
</div>
<div>&gt; 2.&nbsp;<span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">How do I know what data is stored on the file prior</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">&gt; to reading it in (i.e. Variables)? Or is this even possible?</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">Files called &quot;binary&quot; without additional qualification can only be understood by formal documentation, or by at least a minimal description from the person who created
 the file.&nbsp; You need to get this description from the source of your data.&nbsp; Typically there is no descriptive metadata stored inside such files, and the assumption is that this description is somewhere external.</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;">The description should include file layout details such as array sizes, positions, dimension order of storage, elemental data type, byte order, fortran write mode if
 any, and record structure if any.&nbsp; The description should also include what variables and possibly metadata are stored.&nbsp; If the layout details are hard to get, it can sometimes help to find out just what software created the file.</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: helvetica, sans-serif; font-size: 14px;"><br>
</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">The suffix&nbsp;</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">.ieeer8 says to me, &quot;8-byte reals&quot;, because only fortran uses
 the type name &quot;real&quot; instead of &quot;float&quot; or &quot;floating point&quot;.&nbsp; A fuller type description is&nbsp;</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">&quot;8-byte IEEE floating point values&quot;, but that is just a guess.&nbsp; If correct,
 that would be NCL data type &quot;double&quot;, and that does not answer any of the other questions about file layout</span><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">.</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;"><br>
</span></div>
<div><span style="font-size: 14px; color: rgb(0, 0, 0); font-family: helvetica, sans-serif;">--Dave</span></div>
<div><font color="#000000" face="helvetica,sans-serif"><br>
</font>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 4, 2017 at 1:47 PM, Dennis Shea <span dir="ltr">
&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>Were the data records written by fortran or<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; See: <a href="http://www.atmos.washington.edu/~salathe/osx_unix/endian.html" target="_blank">
http://www.atmos.washington.<wbr>edu/~salathe/osx_unix/endian.<wbr>html</a><br>
<br>
</div>
<div>or ?????<br>
</div>
<div><br>
[0]<br>
</div>
<div>The problem with binary is that someone must describe how the data was written. Fortran's default (sequential) binary has **hidden record separators**. The user could also open a binary with &quot;access=direct&quot;. This means 'flat' binary files (no record separators.<br>
<br>
</div>
<div>[1] <br>
Were the binary files created on a big- or little-endian system? See: <a href="https://en.wikipedia.org/wiki/Endianness" target="_blank">
https://en.wikipedia.org/wiki/<wbr>Endianness</a><br>
</div>
<div><br>
[2]<br>
</div>
Likely, fbindirread *or* fbinrecread would work. However, without more knowledge not much more can be said.<br>
<br>
[3]<br>
</div>
One major reason for the creation of HDF and netCDF to allow the files to be 'blindly' examined via a suite of standard function functions.<br>
<br>
<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 4, 2017 at 1:30 PM, Hughlett, Taylor M <span dir="ltr">
&lt;<a href="mailto:taylor.hughlett@uta.edu" target="_blank">taylor.hughlett@uta.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:12px;font-family:helvetica,sans-serif">
<div>
<div>
<div>
<div>Good afternoon everyone,</div>
<div><br>
</div>
<div>I am attempting to read in a .ieeer8 file using NCL so that it can be plotted.&nbsp;</div>
<div><br>
</div>
<div>I am completely new with binary files, so bear with me.</div>
<div><br>
</div>
<div>I understand that this is a binary file, so visualization and reading it is much more complicated than it would be with netCDF&#8217;s.&nbsp;</div>
<div><br>
</div>
<div>After having looked over the instructions on the NCL site, I am still having some confusion with how to get started.</div>
<div><br>
</div>
<div>Specifically, I have these questions:</div>
<ol>
<li>Will the fbindirread work to read in a .ieeer8 file (I am assuming the file is fortran as it is a restart file for CESM1&#8217;s POP2)?</li><li>How do I know what data is stored on the file prior to reading it in (i.e. Variables)? Or is this even possible?</li></ol>
<div>Any help would be greatly appreciated with this, and I am happy to provide more information if it is required.</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Taylor M Hughlett, Ph.D.<br>
UTA Earth and Environmental Sciences<br>
500 Yates St.<br>
Geoscience Bldg Rm 117<br>
Arlington, TX 76013-0049</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span>
</body>
</html>