Skip to content

TSTool / Command / DeselectTimeSeries


Overview

The DeselectTimeSeries command deselects output time series, as if done interactively, to indicate which time series SHOULD NOT be operated on by following commands. The command minimizes the need for the Free command when used in conjunction with other commands that use a time series list based on selected time series (TSList=SelectedTS). See also the SelectTimeSeries command.

Command Editor

The command is available in the following TSTool menu:

  • Commands / Select, Free, Sort Time Series

The following dialog is used to edit the command and illustrates the command syntax.

DeselectTimeSeries command editor

DeselectTimeSeries Command Editor (see full-size image)

Command Syntax

The command syntax is as follows:

DeselectTimeSeries(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.
  • TSPosition – time series specified by position in the results list (see TSPosition parameter below).
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
TSPosition A list of time series positions (1+) in output, separated by commas. Ranges can be specified as Start-End. Required if TSList=TSPosition
SelectAllFirst Indicates whether all time series should be selected before deselecting the specified time series: True or False. False
IfNotFound Indicate how to handle the case of no time series being matched:
  • Ignore – OK if time series matched
  • Warn – generate a warning message
  • Fail – generate a failure message
Fail
SelectedCountProperty If specified, the corresponding time series property will be set to the number of selected time series after the command is executed. This is useful in cases where following commands are wrapped in an If command and should only be executed if the count is > 0. Also use to check for count of 0 and warn with the Message command. Can be specified using processor ${Property}.
UnselectedCountProperty If specified, the corresponding time series property will be set to the number of unselected time series after the command is executed. This is useful in cases where following commands are wrapped in an If command and should only be executed based on the count value. Also use to check for count of 0 and warn with the Message command. Can be specified using processor ${Property}.

Examples

See the automated tests.

A sample command file is as follows:

NewPatternTimeSeries(Alias="401234",NewTSID="401234..Precip.Day",Description="Example data",SetStart="2000-01-01",SetEnd="2000-12-31",Units="IN",PatternValues="0,1,3,0,0,0")
DeselectTimeSeries(TSList=AllMatchingTSID,TSID="40*",SelectAllFirst=True)

Troubleshooting

See the main TSTool Troubleshooting documentation.

See Also