cdfgriv −− turn specified 2-D fields into 1-D fields
cdfgriv xname xthin yname ythin field1 ...
Cdfgriv expects a Candis file on the standard input containing at least one two-dimensional field. It writes a Candis file to the standard output in which one-dimensional versions of the specified two-dimensional fields are added. Two additional fields are provided which contain the x and y coordinates of each element of the converted fields. If a specified field has the name "fld1", the converted field has the name "fld1.l1". It is a function of a new index field called "index1". If the original index fields have names "x" and "y", then the new fields containing the x and y coordinates are named "x.l1" and "y.l1". These are also functions of "index1". The trailing number is incremented by 1 for each subsequent call to cdfgriv on the same file. This facilitates making more than one set of vectors available to plotting programs.
The first and third command line arguments specify the names of the first and second dimensions of the two-dimensional fields of interest. They must be specified in the order in which they appear in the Candis file. The second and fourth arguments are parameters which define the stride in each dimension through the two-dimensional fields. All subsequent arguments are names of fields to be converted to one-dimensional form. If xthin = 1, then every x point is converted, if xthin = 2, every other x point is converted, etc., with the same relationship applying between ythin and the y dimension. The starting x and y points are respectively xthin/2 and ythin/2.
Cdfgriv was created to aid in the plotting of vector fields using the GRI graphics package of Dan Kelley of Dalhousie University (Dan.Kelley@Dal.CA). See http://www.phys.ocean.dal.ca/~kelley/gri.