CDFROLL

NAME
SYNOPSIS
DESCRIPTION
EXAMPLE

NAME

cdfroll −− cyclically shift field values

SYNOPSIS

cdfroll -[c|r] dimension timevar rate

DESCRIPTION

Cdfroll cyclically shifts all field values in variable slices by an integer number of cells along the specified dimension. The number of cells shifted equals minus the value of the variable "timevar" times the value of "rate" divided by the cell size (assumed constant) for the specified dimension. The actual integer number of cells shifted is the rounded value of the float result. The field "timevar" must be a zero-dimensional field. Either the flag -c or -r must be specified. In the former case the left end values of the fields are assumed not to be replicated at the right end; in the latter case, replication is assumed and accounted for.

Cdfroll can be used to make Galilean transformations on Candis files with multiple variable slices where the value of "timevar" varies between slices. The argument "rate" can be thought of as the velocity of a new coordinate system relative to the original system. For positive values of "rate" the origin of the new coordinate system moves to the right, which means that the data in the fields are moved to the left by an equivalent amount. Note that any velocity fields are not automatically changed to match the Galilean transformation -- this needs to be done manually using cdfmath.

EXAMPLE

kestrel% cdfroll -r x time 5 < input_file > output_file

All fields with dimension "x" are shifted cyclically to the left an amount equal to "time*5". Fields are assumed to replicate their initial value at the end of the "x" dimension.