Analysis Tools and Methods

Binary

The following is by Dennis Shea (NCAR):

Binary files encountered in climate are generally created from compiled languages such as fortran or C/C++. These are easy to create and are supported by the compiled languages. Some software tools used in climate research (IDL, Matlab) can produce binary files but they are proprietary and are best read with the tools that produce them.  Binary files created by fortran/C/C++ require that the user know, a priori, the following:

     (a) The structure or lay-out of the data;
     (b) The data types [eg., integer, float, double] of all the variables;
     (c) The "endian" type of the file being read (big endian or little endian);
     (d) Whether the file is a 'flat' binary file or if it was written with, say, fortran a sequential write statement, in which case, there are hidden record separators.

Without this external collection of information, it is difficult to unambigously ascertain a binary file's contents. As a result there are no generic file tools to deal with binary files.  This is one  reason why binary files are not in general use for archiving climate data.

Cite this page

National Center for Atmospheric Research Staff (Eds). Last modified 23 Jul 2013. "The Climate Data Guide: Binary." Retrieved from https://climatedataguide.ucar.edu/climate-data-tools-and-analysis/binary.

Acknowledgement of any material taken from this page is appreciated. On behalf of experts who have contributed data, advice, and/or figures, please cite their work as well.