cdfbadcut −− reduce to a subspace at the limit of good data
cdfbadcut -[f|l] dimension test_field
Cdfbadcut carves an n - 1 dimensional subspace out of an n dimensional space. The subspace is the locus of the positions of either the first (-f) or the last (-l) good data in the test field along the specified dimension. First and last are defined in terms of increasing dimension index. Values of fields on the subspace are retained in the output if they have the same dimensionality as the test field. (This includes the test field itself.) Fields without the specified dimension are passed unchanged. Fields with the specified dimension, but with different dimensionality than the test field are filled with bad data values. The index field associated with the named dimension becomes a variable field with the same dimensionality as the reduced test field.
The input Candis file is expected on the standard input, and the output file appears on the standard output. If the specified dimension doesn’t have a corresponding index field, the program fails. In regions where the test field has bad data for all values of the specified dimension, the surface is undefined, and all data are given the bad data value.
kestrel% cdfbadcut -l z dbz < input_file > output_file
In this example the input file is three-dimensional (x, y, z) radar data, and the field dbz is the radar reflectivity. The last or highest level at which the reflectivity is defined becomes the subspace. In other words, the surface is the radar-observed upper boundary of the cloud. The lower boundary could be obtained by substituting -f for -l. Values of all fields on this surface are included in the output file.