[comp.lang.fortran] unformatted i/o - SOLUTION, and self-describing data formats

rab@murdu.oz (Richard Alan Brown) (03/15/90)

Summary: 
Expires: 
References: <14409@phoenix.Princeton.EDU> <14439@phoenix.Princeton.EDU> <5207@odin.SGI.COM>
Sender: 
Reply-To: rab@murdu.UUCP (Richard Alan Brown)
Followup-To: 
Distribution: comp.lang.fortran,comp.sys.super,comp.unix.cray
Organization: Computing Services, Melb. Uni.
Keywords: data formats, DG, 88k, Green Hills Fortran

The binary file problem has been driving me crazy too. I have been using
the Green Hills Fortran compiler on a Data General 88k AViiON running
DG/UX. I can't wait to try out your solution.

But why I'm *really* writing here is this intruiging statement:

Eric Jackson ( ej@acm.princeton.edu ) writes:
> They should also probably include or be usable
> with a data format library like netCDF to allow self-describing datasets. 

I don't know how na\"ive I'm being here, but I have not been aware of such
developments. About two years ago, after going bonkers with various file
formats, I thought of this idea: to have a self-describing data file.

At the time I thought this was pretty smart, but obviously I was
re-inventing the wheel. I wrote routines to read and write these files,
which I called GDF (for Generalised Data Format), implementing the file
description in a header which can be as small as four bytes. It turns out
that you can describe an enormous number of differeing formats in this
way (what types of data, how many dimensions, are there errors on X? Y?
Z?, etc...), extending the header as needed. One bit in the GDF header
specified that there was 'local data', i.e. data that is skipped by the
GDF routines, but that can be read by an application program (usually the
one that created the data).

However, the format was heavily data-oriented, and what I wanted to do
next was to implement named 'subfiles' within the main file, so that
you could ask for a data set by name, rather than asking for the Nth one.
Like many things, one does occasionally get distracted by the work one is
actually supposed to be doing, and so I never did get around to it.

So: your statement is exciting! What formats are available? Are they well
known? Are there many of them? What are their pros and cons? Are they
written in C, Fortran, ... ?

Richard Brown
rab@murdu.ucs.unimelb.EDU.AU