Skip to content

TSTool / Command / ChangePeriod


Overview

The ChangePeriod command changes the period for the given time series, for example to extend the time series. A longer period will be filled with missing values.

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.

ChangePeriod command editor

ChangePeriod Command Editor (see full-size image)

Command Syntax

The command syntax is as follows:

ChangePeriod(Parameter="Value",...)

Command Parameters

Parameter            Description Default                           
TSList Indicates the list of time series to be processed, one of:
  • AllMatchingTSID – all time series that match the TSID (single TSID or TSID with wildcards) will be processed.
  • AllTS – all time series before the command.
  • EnsembleID – all time series in the ensemble will be processed (see the EnsembleID parameter).
  • FirstMatchingTSID – the first time series that matches the TSID (single TSID or TSID with wildcards) will be processed.
  • LastMatchingTSID – the last time series that matches the TSID (single TSID or TSID with wildcards) will be processed.
  • SelectedTS – the time series are those selected with the SelectTimeSeries command.
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
NewStart The new period start, specified to precision that matches the time series data interval. Can be specified with a processor ${Property}. Start will remain the same.
NewEnd The new period end, specified to precision that matches the time series data interval. Can be specified with a processor ${Property}. End will remain the same.

Examples

See the automated tests.

A sample command file to change the period for a time series from the State of Colorado’s HydroBase database is as follows:

# 08236000 - ALAMOSA RIVER ABOVE TERRACE RESERVOIR
08236000.DWR.Streamflow.Month~HydroBase
ChangePeriod(TSList=AllTS,NewStart="1900-01")

Troubleshooting

See the main TSTool Troubleshooting documentation.

See Also