next up previous contents index
Next: 4.2 Example of UIO Up: 4 UIO Data Format Previous: 4 UIO Data Format   Contents   Index


4.1 Quickstart: Introduction to UIO

The UIO (``Universal Input Output'') routines are a set of routines in Fortran90 and IDL to manage I/O of scalars, arrays and a certain table type. Files can be formatted or unformatted.

The formatted (ASCII text) data representation is machine-independent and appropriate for human reading.

The unformatted (binary) representation provides much faster I/O, gives smaller files and the IEEE format is a quasi-standard among many platforms/compilers. On all platforms the native binary representation can be chosen. On some machines additional conversion types are offered (IEEE on most machines, CRAY format an CRAYs).

Files produced with UIO are not automatically readable on all machines. But it is always possible to produce (formatted) UIO files on a machine which are readable on all others. And with some fiddling with compile options or the call of machine-specific subroutines provided by the compiler vendor it was up to now always possible to enable the access to binary UIO files on all machine tested.

Each file entry is a header-data-unit. The header contains information on the one hand to identify the entry and on the other hand to specify the format and size of the following data block. This data block usually consists of a scalar or an array. In some cases it is empty (e.g. for labels) or it contains more complex information (for tables).

The first version of UIO routines was written in FORTRAN77. They still exist. But further development was done with the Fortran90 versions. Therefore, the use of the FORTRAN77 routines is not recommended anymore. The current Fortran version of the UIO routines is a set of Fortran90 modules.

To allow a communication between Fortran and IDL programs, an IDL version of the UIO routines has been written. The correspondence between Fortran and IDL routines is rather close. But in detail, there are differences. Currently, IDL Version 5.4 (sunos sparc) is used. Amazingly, the UIO routines also used to work under PV-WAVE (Version 6.01 (sun4 solaris sparc)). The UIO routines have been successfully compiled and used on Cray, alpha, HP V2500, HP Itanium2, Hitachi, Linux (with PGI and Intel compiler), SGI, and Sun machines.

So far, there exist three UNIX shell scripts (calling Fortran routines) useful to quickly examine data sets or to change the format or conversion type of files.


next up previous contents index
Next: 4.2 Example of UIO Up: 4 UIO Data Format Previous: 4 UIO Data Format   Contents   Index