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

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

NAME

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

DESCRIPTION

The cdf_extract_unstructured_points object extracts data from a netCDF file as a unstructured_point_set, and then creates a data set with the unstructured_point_set as the geometry. 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 coordinates: "x_selection=(args)," "y_selection=(args)," and "z_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 hyperslabs as geometry, and creates data set in its data_out.

x_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting x coordinates.

x_selection? return the value of the current selection list for x coordinates.

y_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting x coordinates.

y_selection? return the value of the current selection list for x coordinates.

z_selection= (var_name, dim_id,start,end, dim_id,start,end, ...) Set the selection list for extracting z coordinates.

z_selection? return the value of the current selection list for z coordinates.

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_vector


Please send comments and suggestions to
consult@rpi.edu