TSTool / Command / Delta
Delta command creates a new time series from an input time series.
The resulting values are computed as the difference between each value and the previous value.
Consequently, the delta result is the change from the previous value.
CheckTimeSeries command can be used to check time series
for changes that exceed a threshold; however,
Delta command handles the complexity of time series
that reset to a new starting value – the output can be used in conjunction with
Delta command will create as many output time series as there are input time series.
The output value is simply the current value minus the previous value. The result is set to missing if this value cannot be computed due to missing values, or in cases where a transition across a reset has errors.
If the data do reset, then the expected trend should be specified to allow the
ResetMax parameters to be properly interpreted.
For example, if Trend=Increasing and a decrease is detected,
it is assumed that the values have circled past the reset values.
In this case the command will attempt to compute the change across the reset values.
If this is not possible, then warnings will be generated and the result will be set to missing.
Specific cases that are handled are:
- The previous value is out of range – in this case the contribution from the out of range previous value is added to the delta and default flag value is assigned (see Flag parameter description). A warning will be generated.
- The current value is out of range – in this case the difference will be decreased because the reset value has not be achieved. A warning will be generated.
The above special cases result in somewhat arbitrary difference values because the inputs do not conform to expected values. Out of range values indicate erroneous data that should be corrected before being used in further analysis.
Irregular-interval time series that result in differences not being computed will have missing values inserted at appropriate locations to maintain consistent data point spacing with the original data.
The following dialog is used to edit the command and illustrates the syntax of the command.
Delta Command Editor (see also the full-size image)
The command syntax is as follows:
||Indicates the list of time series to be processed, one of:
||The time series identifier or alias for the time series to be processed, using the
||The ensemble to be processed, if processing an ensemble. Can be specified using
||The minimum expected data value, used when data are expected to increase (or decrease) to a threshold and then reset, for example raw precipitation values that reset to zero when a container fills.||Data are not expected to reset.|
||The maximum expected data value, used when data are expected to increase (or decrease) to a threshold and then reset, for example raw precipitation values that reset to zero when a container fills.||Data are not expected to reset.|
||Indicates trend of data, used when values can reset:
||The date/time to start analyzing data. Can be specified using
||Full period is analyzed.|
||The date/time to end analyzing data. Can be specified using
||Full period is analyzed.|
||A string to flag problem values, or Auto for default flags:
Can be specified using
|Do not flag problem values.|
||Alias to assign to created time series. A literal string can be specified or use %-specifiers to set the alias dynamically (e.g.,
||None (but is highly recommended).|
See the automated tests.