ReadLat

DESCRIPTION

This module reads in lattice data in IRIS Explorer lattice format (either ASCII or binary), such as that transcribed by WriteLat or DataScribe modules, or in `plain' ASCII format.

The plain format allows a single file to contain multiple data structures, or steps. The variable nSteps (see below) gives the number of steps in the file. This is used by ReadLat when selecting the data step to be inserted into the output lattice.

The plain file format is as follows. The first line of the file must be

#!/usr/explorer/bin/explorer cxLattice plain 1.0

Comment lines begin with a `#' character, and whitespace is ignored. The file may contain multiple data structures (or steps). The file should contain the following fields, in this order:

nDim
number of dimensions of the input lattice.
dims
the vector of dimensions of the input lattice.
nDataVar
the number of data variables at each node of the lattice.
primType
primitive type of data, represented as an integer. Its value must be 0 for byte, 1 for short, 2 for long, 3 for float, 4 for double.
coordType
type of coordinates, represented as an integer. Its value must be 0 for uniform, 1 for perimeter, 2 for curvilinear.
nSteps
the number of data structures in the file.
nCoordVar
the number of coordinate variables. This variable must only be present in the file if the coordinate type is curvilinear.
coordinate values
For uniform lattices, these are the bounding box values; for perimeter values these are the values of the edge points. For curvilinear lattices the coordinate values are arranged in row-major format (ie. I varying fastest). See the Module Writer's Guide for a description of lattice coordinate arrays.
data values
for step = 1 .. nSteps. Data vector at each node, again with I varying fastest.
Example data in all three formats can be found in the directory ${EXPLORERHOME}/data/lattice (on UNIX machines) or %EXPLORERHOME%\data\lattice (on NT machines). The source code for the module can be found in the directory ${EXPLORERHOME}/src/readers (UNIX) or %EXPLORERHOME%\src\readers (NT).

INPUTS

WIDGETS

Port: File Name
Type: Text
The name of the file to be read.

Port: Step
Type: Slider
If the file contains data at multiple time steps, this parameter is used to select the step number, otherwise the widget is hidden. It is only visible when reading a file in the `plain' format.

OUTPUTS

Port: Lattice
Type: Lattice
The output lattice.

KNOWN PROBLEMS

The file browser widget does not correctly browse files on remote machines. The remote filename can be entered in the selection box, but the option menu is inoperable. Only crude error checking is done for plain format files. If the input file is malformed, the module may crash.

SEE ALSO

WriteLat, GenericDS.
[Documentation Home]
© The Numerical Algorithms Group Ltd, Oxford UK. 2000