Re: Binary output file size missmatch

From: Andrew Mai <mai_at_nyahnyahspammersnyahnyah>
Date: Fri, 01 May 2009 09:08:49 -0600

Agnes Lim Huei Ni wrote:

> I am outputing a variable from grib to binary using fbinrecwrite.
> From the printVarySummary it says there are
> Total Size: 1051168 bytes
> 262792 values
> When I did a ls -l to check the binary file size, I got 1051176, which
> is 8 bytes more

fbinrecwrite makes Fortran sequential access unformatted (binary) files.
In this type of Fortran file there are two so-called record control
words, one at the beginning and one at the end of each record. These are
each a 4-byte integer which simply specify the number of bytes in the
record. (The one at the end of the record is needed for the Fortran
BACKSPACE command.) Since you are writing a single record, you have 2x4
= 8 bytes in addition to those comprising the the raw data.

If you do not want these, use fbindirwrite.


ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Fri May 01 2009 - 09:08:49 MDT

This archive was generated by hypermail 2.2.0 : Fri May 01 2009 - 15:10:00 MDT