TSTool / Command / SelectTimeSeries
Overview
The SelectTimeSeries
command selects output time series, as if done interactively,
to indicate which time series should be operated on by following commands.
The command minimizes the need for the Free
command because other
commands that operate on a time series list can use TSList=SelectedTS
.
See also the DeselectTimeSeries
command.
Command Editor
The following dialog is used to edit the command and illustrates the command
syntax for selecting time series using the TSList
parameter.
This parameter provides the initial filter for the list of time series.
The TSPosition
parameter is generally not available in other commands - its use is discouraged in
most cases because time series position in the output list can vary.
SelectTimeSeries
Command Editor (see also the full-size image)
The following dialog is used to edit the command and illustrates selecting time series by matching a property value.
SelectTimeSeries
Command Editor Specifying a Property to Match (see also the full-size image)
The following dialog is used to edit the command and illustrates selecting time series by evaluating a time series statistic.
SelectTimeSeries
Command Editor Specifying a Statistic to Check (see also the full-size image)
The following dialog is used to edit the command and illustrates selecting time series by matching locations in a network.
SelectTimeSeries
Command Editor Specifying Network Nodes (see also the full-size image)
Command Syntax
The command syntax is as follows:
SelectTimeSeries(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 |
TSPosition |
A list of time series positions (1+) in output, separated by commas. Ranges can be specified as Start-End . |
Required if TSList=TSPosition |
DeselectAllFirst |
Indicate whether all time series should be deselected before selecting the specified time series: True or False . |
False |
IfNotFound |
Indicate how to handle the case of no time series being matched:
Fail – generate a failure message |
Fail |
PropertyName |
Name of user-defined property to check. A property, if specified, is additive to selections from the TSList parameter. Can be specified using processor ${Property} . |
|
PropertyCriterion |
Criterion to evaluate to determine which properties match. Required if PropertyName is specified. |
|
PropertyValue |
Value to check against the property value, using criterion. Can be specified using processor ${Property} . |
Required if PropertyName is specified. |
NetworkID |
The identifier for the network if selecting based on match of network node identifiers and location part of time series identifier. | Network select is not used. |
DownstreamNodeID |
The downstream node in the network to match. If preceded by a dash, don’t include the node in output. | Network select is not used. |
UpstreamNodeIDs |
Comma-separated list of upstream network node identifiers to match. If any identifier is preceded by a dash, don’t include the node in output. | If selecting from network, select all nodes upstream of the downstream node. |
SelectCountProperty |
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} . |
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")
SelectTimeSeries(TSList=AllMatchingTSID,TSID="40*",DeselectAllFirst=True)
Troubleshooting
See Also
DeselectTimeSeries
commandFree
command