(All of these specifications must be on a single line. There is no
support for continuation characters.) variable specifies where to find
data information, its type, and how to read it. coord specifies where to
find coordinate information, its type, and how to read it. It is used when
the data is rectilinear or irregular. structure specifies the where to
find the coordinate information for the hierarchical adaptive field types
like adaptivegrid, sparsegrid and octree.
Extended:
structure specification added for adaptivegrid, sparsegrid and octree field types.
The individual parameters are interpreted as follows:
-
n - An integer value that specifies which element of a data vector
or which coordinate (1 for x, 2 for y, 3 for z, and so on) the subsequent
read instructions apply to. n does not default to 1 and must be specified.
-
file = filespec - The name of the file containing the data or coordinates.
The filespec can be an absolute full pathname to a file, or it can be a
filespec relative to the directory that contains the field ASCII header.
For example, an absolute pathname might be /home/myuserid/experiment/data.
In a relative pathname specification, if the ASCII file of field parsing
instructions exists in the file /home/myuserid/experiment/readit.fld and
the data and coordinates file are in the subdirectory /home/myuserid/experiment/data,
you can name these files as xdata/xyzs and data/values. The advantage
of this second approach is that you can move the directories containing
your data around without having to change the contents of the ASCII parsing
instruction file.
-
filetype = ascii - ascii means that the data or coordinate information
is in an ASCII file. In ASCII files, float data can be specified in either
real (0.1) or scientific notation (1.00000e-01) format interchangeably.
-
filetype = unformatted - the file is written in FORTRAN unformatted
format. (FORTRAN unformatted data is binary data with additional
words written at the beginning and end of each data block stating the number
of bytes or words in the data block.) In general, Read_Field can
read unformatted files where all variables of one type (for example, all
the X coordinates) were output as one "record" in a single write statement.
This is usually the case.
-
Restricted:No
unformatted filetype support!
-
filetype = binary - the file is written in straight binary format,
such as that produced by UNIX output routines, write and fwrite. See the
warning on binary compatibility among different hardware platforms in
Section 5.73, Read_Field. In each case, Read_Field will use the data type
specified in the earlier data={byte,float,integer,double} statement when
it interprets the file.
-
Restricted:No
binary filetype support!
-
skip = n - For ascii files, skip specifies the number of lines to
skip over before starting to read the data. Lines are demarked by newline
characters. For binary or unformatted files, skip specifies the number
of bytes to skip over before starting to read the data. There are two motivations
for skip. First, data files often include header information irrelevant
to the AVS/Express field data type. Second, if the file contains, for example,
all X data values, then all Y data values, skip provides a way to space
across the irrelevant data to the correct starting point. You can only
use skip once at the start of the file. There is no way to skip, read,
stride, then skip again. You must simply know what value to use for skip
based on your knowledge of the software that produced the original data
file, the number of data elements, and the type (byte, float, double, integer,
etc.) skip defaults to 0.
-
offset = m - offset is only relevant to ASCII files; it is ignored
for binary and unformatted files. offset specifies the number of
columns to space over before starting to read the first datum. (The stride
specification determines how subsequent data are read.) Hence, to read
the fourth column of numbers in an ASCII file, use offset=3. In ASCII files,
columns must be separated by one or more blank characters. Commas, semicolons,
TAB characters, and so on, are not recognized as delimiters. If necessary,
edit ASCII files to meet this restriction. offset defaults to 0 (the first
column, no columns spaced over).
-
stride = p - stride assumes you are "standing on" the data value
just read. stride specifies how many "strides" must be taken to get to
the next data value. In ASCII files, stride means stride forward p delimited
items. In binary and unformatted files, stride means stride forward p times
the size of the data type (byte, float, double, integer). In a file where
the data or coordinate values are sequential, one after the other, the
stride would be 1. Note that this presumes homogeneous data in binary and
unformatted files - double-precision values could not be intermixed with
single precision values. stride defaults to 1. The stride value will be
repeatedly used until the number of data items indicated by the product
of the dimensions (for example, dim1 * dim2 * dim3) have been read.