[ncl-talk] Reading in .ieeer8 file and plotting it with NCL
Hughlett, Taylor M
taylor.hughlett at uta.edu
Thu Jan 5 10:20:29 MST 2017
Hi Dennis,
I was able to track down some specifics about the file I am trying to plot:
1. It was created with fortran on a big-endian system
2. There are 2, 12 month records for a 384x320 horizontal grid
* SSS(1:384,1:320,1:12)
* FLXIO(1:384,1:320,1:12)
3. The file is double-precision and direct-access
With this information, I am assuming that I will need to use fbindirread to read in the file, and from there it is just a matter of making sure I grab the right record (FLXIO).
Is there anything else I need to take into consideration?
Thank you for all of your help!
Cheers,
Taylor M Hughlett, Ph.D.
UTA Earth and Environmental Sciences
500 Yates St.
Geoscience Bldg Rm 117
Arlington, TX 76013-0049
From: Dennis Shea <shea at ucar.edu<mailto:shea at ucar.edu>>
Date: Wednesday, January 4, 2017 at 2:47 PM
To: "Hughlett, Taylor M" <taylor.hughlett at uta.edu<mailto:taylor.hughlett at uta.edu>>
Cc: "ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>" <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>>
Subject: Re: [ncl-talk] Reading in .ieeer8 file and plotting it with NCL
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<mailto: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
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170105/a68c673f/attachment.html
More information about the ncl-talk
mailing list