subset [ parameter=value ... ] [ inputfile outputfile ] subset [ parameter=value ... ] [ inputfile ... directory ]
Parameters are: include_vars, clip_dims, range_pairs, keep_unit_dims, instantiate.
subset creates variable and/or dimension subsets of input datasets. Subsets can be created without actually copying any variable data. In this case, a subset contains link variables that point back to the input dataset. Alternatively, subsets can be instantiated, a process that copies the necessary variable data from the input datasets.
Users can specify what variables to include or exclude from the subsets. Also, users can clip dimensions, throwing away variable data outside the specified ranges. If a dimension is clipped so it has size 1, it is discarded unless it is the only dimension remaining of a given variable.
All attributes in the input datasets are carried over to the output subsets. This includes earth transform attributes, which are modified to reflect any dimension subsectioning.
Uninstantiated subsets can be instantiated using instant. See instant.
List of variables to include in the output subsets. If the list is prefixed with a minus sign, the listed variables are excluded from the subsets. Wildcards * and ? are allowed. The default is to include all variables.
List of names of dimensions to clip. Wildcards are not allowed. The default is not to clip any dimensions.
Minimum and maximum index for each dimension to be clipped. For example, if two dimensions are being clipped, four numbers must be provided:
min1 max1 min2 max2Indexes are 1-relative. Minimums must not be greater than corresponding maximums. There is no default.
OPTIONAL. Determines whether or not dimensions with length 1 will be kept. Valid responses are [yes, no]. The default is no.
Indicates that the variable data is to be copied over to the subsets. Valid responses are [yes, no]. The default is no.
The following example creates a subset of a dataset big. All variables with dimensions line and sample are clipped; only the first 512 lines and samples are retained in the subset.
[1] % subset big subbig1 include_vars : char(255) ? [] clip_dims : char(159) ? [] line sample range_pairs : int ( 4) ? 1 512 1 512 instantiate : char( 3) ? [no]
Uninstantiated subsets are useful as temporary datasets. However, users must be careful not to orphan them. For example, if Y is an un-instantiated subset of dataset Z, and Z is subsequently moved or removed, Y is left all alone.
Suppose variable V has dimensions Line and Sample, with sizes M and N respectively. Then
keep_unit_dims clip_dims range_pairs output V dims output V size -------------- --------- ----------- ------------- ------------- no Line 1,1 Sample N no Sample 1,1 Line M no Line Sample 1,1,1,1 Sample 1 yes Line 1,1 Line Sample 1xN yes Sample 1,1 Line Sample Mx1 yes Line Sample 1,1,1,1 Line Sample 1x1
Last Update: $Date: 1998/05/29 20:47:24 $