TSTool / Command / ShiftTimeByInterval
Overview
The ShiftTimeByInterval
command shifts a time series in time.
This command can be used to perform a simple shift (e.g., to shift hourly data because the
Disaggregate
command did not
result in data being set at the desired hours) and to perform simple routing.
Command Editor
The command is available in the following TSTool menu:
- Commands / Manipulate Time Series
The following dialog is used to edit the command and illustrates the syntax of the command.
ShiftTimeByInterval
Command Editor (see full-size image)
Command Syntax
The command syntax is as follows:
ShiftTimeByInterval(Parameter="Value",...)
Command Parameters
Parameter | Description | Default |
---|---|---|
TSList |
Indicates the list of time series to be processed, one of:
|
AllTS |
TSID |
The time series identifier or alias for the time series to be processed, using the * wildcard character to match multiple time series. Can be specified using ${Property} . |
Required if TSList=*TSID |
EnsembleID |
The ensemble to be processed, if processing an ensemble. Can be specified using ${Property} . |
Required if TSList=*EnsembleID |
ShiftData |
Interval,multiplier tuples to apply to the data to perform the shift. All values should be separated by commas. An interval of -1 indicates that the previous time step should be shifted to the current time step. If the interval is –1 and the multiplier is 1 , the previous time step is shifted to the current and multiplied by 1 , effectively shifting the time series by one interval. |
None – at least 1 value,multiplier tuple must be specified.} |
Examples
See the automated tests.
A sample command file to shift a time series from the State of Colorado’s HydroBase database is as follows:
# 08213500 - RIO GRANDE RIVER AT THIRTY MILE BRIDGE NEAR CREEDE
08213500.DWR.Streamflow.Day~HydroBase
ShiftTimeByInterval(TSList=AllMatchingTSID,TSID="08213500.DWR.Streamflow.Day",ShiftData="-1,1")
08213500.DWR.Streamflow.Day~HydroBase
The following is the result.
Results from ShiftTimeByInterval
Command (see full-size image)
Troubleshooting
See the main TSTool Troubleshooting documentation.
See Also
Disaggregate
commandSelectTimeSeries
command