next up previous contents index
Next: 4.3.3 Tables Up: 4.3 Structure of UIO Previous: 4.3.1 Data Representation: ASCII   Contents   Index

4.3.2 Data File Structure

The UIO routines only handle sequential files. Each file consists of a list of entries. The first entry describes the file format, conversion type, and the machine who is responsible for it. The following entries contain data (scalars and 1D ...4D arrays of type integer, real (single & double precision), complex (single precision), character; tables with columns of type integer, real (single precision), or character), or structuring information (labels).

Each entry consists of the header and the (possibly empty) data block.

Each header is a list of at most 20 terms separated by blanks or linefeeds. The first term is the entry type (e.g. real, see table 5), followed by an identifier. This identifier should follow the standard rules for variables (lowercase letters, numbers, underscore; starting with letter). It is a name as e.g. rho, v_1. The rest of the terms come in the form ``keyword=value''. See Tab. 6 for some pre-defined keywords.

Table 5: UIO entry types
entry type entry contents
fileform file description (first entry)
integer scalars, 1D ...4D arrays
real scalars, 1D ...4D arrays, single & double precision
complex scalars, 1D ...4D arrays, single precision
character scalars, 1D ...4D arrays
table table with integer, real, character columns
label label entry for file structuring

Table 6: Standard UIO entry header keywords: The keyword is given with a short description and an example. The fourth, fifth, and sixth column indicate if the keyword is a mandatory descriptor (in the file header or for the format of an entry) or if it gives only additional information and is optional and therefore not necessary to specify.
keyword description example descriptor info. necessary
b byte number 4 format   yes
d dimension (0:9) format   yes (arrays)
ds dimension shift (1:1)   yes  
f Fortran format E13.6 format   yes
p values per line 4 format   yes (arrays)
t transformation log10 format    
n name density   yes  
u unit g/cm^3   yes  
date date 1.1.98   yes  
c0...9 comment Dichte   yes  
form file format formatted file   yes (file header)
convert conversion ieee_4 file   yes (file header)
version version 0.1.1997.11.29   yes  
system system IRIX   yes  
machine machine name atlas   yes  
osrelease OS release 6.3   yes  
osversion OS version 12161207   yes  
hardware machine hardware IP32   yes  
language program. language Fortran90   yes  
program program uiotst   yes  
xyz... user defined source   yes  

A header line has a maximum length of 80 characters. A continuation line is indicated by & at the end of the line. A header consists of 20 lines at maximum. It can be preceded by empty lines (except for the file header entry). Example:

real time f=F9.2 b=4 n='Time' u=s c0='Simulation time in seconds' &
  c1='Time count starts at 0.0'

The entry header is followed by the entry data block. This block is empty for labels and the fileform entry but non-empty otherwise.

In an unformatted file each header line is an individual record containing a string with exactly 80 characters. The following data block (scalar or array) is one single record.

In a formatted file each header line is a string of at most 80 characters delimited by a LINEFEED of whatever the operating system decided to be appropriate as EOL character (sequence). The following data block is written as sequence of lines. The number of items per line is specified by the ``p=?'' keyword in the header.

next up previous contents index
Next: 4.3.3 Tables Up: 4.3 Structure of UIO Previous: 4.3.1 Data Representation: ASCII   Contents   Index