[ncl-talk] Reading in .ieeer8 file and plotting it with NCL
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Wed Jan 4 17:52:29 MST 2017
Taylor,
> 2. How do I know what data is stored on the file prior
> to reading it in (i.e. Variables)? Or is this even possible?
Files called "binary" without additional qualification can only be
understood by formal documentation, or by at least a minimal description
from the person who created the file. You need to get this description
from the source of your data. Typically there is no descriptive metadata
stored inside such files, and the assumption is that this description is
somewhere external.
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. The description
should also include what variables and possibly metadata are stored. If
the layout details are hard to get, it can sometimes help to find out just
what software created the file.
The suffix .ieeer8 says to me, "8-byte reals", because only fortran uses
the type name "real" instead of "float" or "floating point". A fuller type
description is "8-byte IEEE floating point values", but that is just a
guess. If correct, that would be NCL data type "double", and that does not
answer any of the other questions about file layout.
--Dave
On Wed, Jan 4, 2017 at 1:47 PM, Dennis Shea <shea at ucar.edu> wrote:
> Were the data records written by fortran or
> See: http://www.atmos.washington.edu/~salathe/osx_unix/endian.html
>
> or ?????
>
> [0]
> 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 "access=direct". This
> means 'flat' binary files (no record separators.
>
> [1]
> Were the binary files created on a big- or little-endian system? See:
> https://en.wikipedia.org/wiki/Endianness
>
> [2]
> Likely, fbindirread *or* fbinrecread would work. However, without more
> knowledge not much more can be said.
>
> [3]
> 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.
>
>
>
> On Wed, Jan 4, 2017 at 1:30 PM, Hughlett, Taylor M <
> taylor.hughlett at uta.edu> wrote:
>
>> Good afternoon everyone,
>>
>> I am attempting to read in a .ieeer8 file using NCL so that it can be
>> plotted.
>>
>> I am completely new with binary files, so bear with me.
>>
>> I understand that this is a binary file, so visualization and reading it
>> is much more complicated than it would be with netCDF’s.
>>
>> After having looked over the instructions on the NCL site, I am still
>> having some confusion with how to get started.
>>
>> Specifically, I have these questions:
>>
>> 1. 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’s POP2)?
>> 2. How do I know what data is stored on the file prior to reading it
>> in (i.e. Variables)? Or is this even possible?
>>
>> Any help would be greatly appreciated with this, and I am happy to
>> provide more information if it is required.
>>
>> Thanks,
>> Taylor M Hughlett, Ph.D.
>> UTA Earth and Environmental Sciences
>> 500 Yates St.
>> Geoscience Bldg Rm 117
>> Arlington, TX 76013-0049
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170104/53530a82/attachment.html
More information about the ncl-talk
mailing list