<<<<<<<<<<<<<<<<<

cdf_extract_vector(netcdf) VISAGE I/O" cdf_extract_vector(netcdf)

NAME

cdf_extract_vector - extract data from netCDF file and place into data set

DESCRIPTION

The cdf_extract_vector object extracts data from a netCDF file as a visage_vector, and then creates a data set with the visage_vector as the vector data. This data set can then be combined with others data sets (using merge_data_sets filter) for further processing.

An important feature of this object is specifying selection criterion for extracting data from the netCDF file. There are three separate messages to specify selections for the x, y, and z velocity components: "vx_selection=(args)," "vy_selection=(args)," and "vz_selection=(args). (The arguments to these methods are the same as described in the man page for cdf_extract_data.) Note that the number of data for each component must all be the same; otherwise an error is reported.

SUPERCLASS

cdf_extract_data

INSTANCE VARIABLES

(none - inherited from superclass)

MESSAGES

read! reads netCDF file, extracts hyperslab as vector, and creates data set in its data_out.

vx_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting x component of velocity

vx_selection? return the value of the current selection list for x component of velocity vector.

vy_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting x component of velocity

vy_selection? return the value of the current selection list for x component of velocity vector.

vz_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting z component of velocity

vz_selection? return the value of the current selection list for z component of velocity vector.

free! Free internal memory and return to superclass to free object.

EXAMPLE

Data is extracted from netCDF file as separate unstructured point set geometry, scalar, and vector. The merge_data_sets filter is used to paste them together to form a single data set.

/* * Scripts tests the cdf_extract_data objects */ /* * For scalar extract portion of y-components of velocity data * (second time step) */ scalar new: no_pts = 10; /* set size of data to extract */

cdf_extract_scalar new: scalar_reader filename=`test.cdf' selection=(velocity, 1,2,2, 2,1,no_pts, 3,2,2) ;

/* * Extract third time step of velocity data */ cdf_extract_vector new: vector_reader filename=`test.cdf' vx_selection=(velocity, 1,3,3, 2,1,no_pts, 3,1,1) vy_selection=(velocity, 1,3,3, 2,1,no_pts, 3,2,2) vz_selection=(velocity, 1,3,3, 2,1,no_pts, 3,3,3) ;

/* * Extract first time step of pressure for x-axis; second time step * of velocity z-component for y-axis; points (i.e., * test_grid) y coordinates for z-axis */ cdf_extract_unstructured_points new: geom_reader filename=`test.cdf' x_selection=(pressure, 1,1,1, 2,1,no_pts, 3,1,1) /* default 3,1,1 */ y_selection=(velocity, 1,2,2, 2,1,no_pts, 3,3,3) z_selection=(test_grid, 1,1,no_pts, 2,2,2) ;

merge_data_sets new: merge data_in= (geom_reader, scalar_reader, vector_reader) output! ;

SEE ALSO

cdf_reader, cdf_extract_data, cdf_extract_scalar, cdf_extract_unstructured_points


Please send comments and suggestions to
consult@rpi.edu