H5read_field, H5read_time_field

Synopsis

H5read_field reads an Express field out of an HDF5 file. H5read_time_field is similar to H5read_field except that it reads in all steps of a time-dependent field.

module H5read_time_field<need_objs="Mesh_Unif Mesh_Rect
Time_Mesh_Struct Time_Node_Data Time_Cell_Data"> {
string+Iparam filename;
string+read+IPort2 h5root = "/";
// components/variables
int+IPort2 nodeVars[]; // Node Data components
int+IPort2 cellVars[]; // Cell Data components
// crop parameters (arrays are ndim in size)
int+read+IPort2 min[];
int+read+IPort2 max[];
// downsize parameter
int+read+IPort2 factor[]; // (array is ndim in size)
// When you consider all the possible combinations, e.g.
// Time_Mesh+Node_Data, Mesh+Time_Node_Data, etc., its
// remarkable how minimal the greatest common denominator is.
Cells+Xform+Oparam &outFld {
int nspace;
int nnodes;
int nsteps;
double time[nsteps];
};
omethod+notify_val+notify_inst update<status=1> =
"HDF5read_time_field_update";
};

Description

The basic field reading module. It reads an Express field out of an HDF5 file. Please note that the HDF5 file must be written using a specific set of Express conventions. This is not a tool for importing arbitrary HDF5 files written by 3rd-party applications.The downsize algorithm implemented in the reader is a bit simpler than DVdownsize so the results may not match exactly when comparing the integrated downsize to a seperate downsize module. For example given a dimension 6 points long, a downsize factor 2 will pick points 0,2,4 in the downsize integrated into the reader, but points 0,2,5 in DVdownsize. DVdownsize has some extra logic for picking the outer bounding points that this modulelacks. The crop/downsize parameters have no effect on unstructured fields.H5read_time_field is similar to H5read_field except that it reads in all steps of a time-dependent field. Conceptually the difference between H5read_field and H5read_time_field is in the output ports. H5read_field always ouputs a regular (non-time-dependent) field while H5read_time_field always outputs a time-dependent field.Inputs and Outputs are almost exactly the same as with H5read_field except there is no timeStep parameter and the outFld parameter will always be a time-dependent field.For code samples that show how to write an HDF5 file compatible with this reader see the directory src/hdf5/examp.

Input

filename

string. The name of the file to read in.

h5root

string. Allows reading of an Express field that is sested in some larger dataset.

nodeVars[]

int. A list of node data component indices. For example, {0,2} would mean to read the first and third (counting from 0) node data components, skipping the second component. nodeVars is optional, the default is to read all the components.

cellVars[]

int. A list of cell data component indices. For example, {0,2} would mean to read the first and third (counting from 0) cell data components, skipping the second component. cellVars is optional, the default is to read all the components.

min[]max[]

int. The min and max arrays are the crop parameters. The length of each array should match the number of dimensions of the field. The min/max are ignored for unstructured fields (which do not have dimensions). The meaning of min and max is exactly the same as with DVcrop and MODS.crop. The min and max arrays are optional; if they are missing, the default is to read the entire field.

factor[]

The factor array contains the downsize parameters. Like min/max, the length the array should match the number of dimensions of the field. factor ignored for unstructured fields. The meaning of factor is similar to DVdownsize and MODS.downsize. The array is optional; if it is missing, the default is to read the entire field.

timeStep

int. If the input file contains an Express time-dependent file, the timeStep parameter is used to pick a time step. If the field is not time-dependent, the parameter is not used.

Output

outfld

The outFld parameter contains the field read from the HDF5 file. The exact type (uniform, rect, etc.) of the field will vary depending on the contents of the HDF5 file.

Example

Not available.

File

v/dv.v

modules/advect.cUtility DVM macrosDVMadvect_param, Advect

See also

H5read_array
H5list_vars
H5write_array
H5write_field, H5write_time_field