CDFOCUT

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE
NOTES

NAME

cdfocut −− extracts data along an arbitrary line through a two−dimensional domain

SYNOPSIS

cdfocut x_name y_name x_value y_value theta xp_low xp_high [u_name1 v_name1] [u_name2 v_name2] [. . . .]

DESCRIPTION

Cdfocut expects a common data format file on the standard input with index fields x_name and y_name defining a plane. The standard output produces a common data format file with data linearly interpolated to points along a line segment in this plane. The line segment is defined by the point (x_value, y_value), called the pivot point, the azimuthal angle theta, and the end points of the line segment relative to the pivot point, xp_low and xp_high. Theta is in degrees, and measures the angle between the x axis and the line, with positive theta rotating the line toward the y axis. If fields are of larger dimension than two, the interpolation is done for each of the values of the other dimensions. Interpolation is performed on fields in the static slice as well as in any and all variable slices.

In the output file the index fields x_name and y_name are replaced by the single index field named x_namep, i. e., the original x field name with a ’p’ appended. The x_namep domain has the same grid interval as the x_name domain. X_namep is defined to be zero at the pivot point, and ranges between the specified values of xp_low and xp_high. All data fields are redefined over this new domain, with data values being determined by bilinear interpolation. If the new domain extends beyond the original x−y domain, bad data values are inserted.

Cdfocut optionally rotates one or more sets of vector components to the new axes in the x−y plane. The first pair of components are assumed to have the names u_name1 and v_name1 in the variable slice(s). These are typically the x and y components of a velocity field. New vector components u_name1p and v_name1p respectively parallel and normal to the line are computed and included in the output if u_name1 and v_name1 are specified. The original fields u_name1 and v_name1 are deleted. Additional vector component pairs to be rotated may be similarly specified.

EXAMPLE

kestrel% cdfocut x y −1.75 1.5 30 −10 15 u v < in_file > out_file

This example would cut a line out of the x−y plane at 30 degrees to the x axis, passing through the point (−1.75, 1.5). The index fields x and y would be deleted, and the new index field xp would be created. Xp represents displacement along the line, with all fields being interpolated over the range [−10, 15] in xp. The u and v fields would be replaced by components up and vp rotated −30 degrees. All dimensions not mentioned on the command line are left untouched, and data fields with neither x_name nor y_name dimensions are passed without change, although fields with only one of these dimensions are not allowed.

NOTES

This version of cdfocut shares the same source code as cdfrotate, with the exception of a different user interface, and represents a degenerate case of cdfrotate. Bugs in the previous cdfocut have been corrected, and a couple new features added, such as enabling multiple vector fields to be specified and allowing differing dx_name and dy_name parameters. However, calls intended for the previous cdfocut will still work correctly with this one.