Skip to content

TSTool / Command / InsertTimeSeriesIntoEnsemble


Overview

The InsertTimeSeriesIntoEnsemble command inserts 1+ time series into an ensemble. The time series must have the same interval and data units as the time series in the ensemble. For example, use the command to insert scenario time series into an ensemble.

Command Editor

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

InsertTimeSeriesIntoEnsemble

InsertTimeSeriesIntoEnsemble Command Editor (see also the full-size image)

Command Syntax

The command syntax is as follows:

InsertTimeSeriesIntoEnsemble(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 from which to retrieve time series, if inserting time series from an ensemble. Required when TSList=EnsembleID.
EnsembleID2
required
The identifier for the ensemble that is receiving the time series. None – must be specified.

Examples

See the automated tests.

A sample command file to create an ensemble from user-defined time series is as follows:

# Test inserting time series into an ensemble from year interval time series
NewPatternTimeSeries(Alias="ts1",NewTSID="ts1..Flow.Year",SetStart="1960",SetEnd="2000",Units="ACFT",PatternValues="1,2,5,8,,20")
NewPatternTimeSeries(Alias="ts2",NewTSID="ts2..Flow.Year",SetStart="1950",SetEnd="2005",Units="ACFT",PatternValues="2,4,10,16,,40")
NewEnsemble(TSList=AllTS,NewEnsembleID="TestEnsemble",NewEnsembleName="Test Ensemble")
InsertTimeSeriesIntoEnsemble(Ensemble2=”TestEnsemble”)

Troubleshooting

See Also