Skip to content

TSTool / Command / SetToMax


Overview

The SetToMax command sets a time series to contain, for each time step, the maximum of its own values and those of one or more additional (independent) time series. This command replaces the legacy SetMax command. See also the SetToMin command.

Command Editor

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

SetToMax

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

Command Syntax

The command syntax is as follows:

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

Command Parameters

Parameter                             Description Default                           
TSID
required
The time series identifier or alias for the time series to be modified. None – must be specified.
IndependentTSList 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.
  • SpecifiedTSID – the specified list of time series given by the IndependentTSID parameter
AllTS (the time series receiving the result will not be included)
IndependentTSID 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 IndependentTSList=*TSID
IndependentEnsembleID The ensemble to be processed, if processing an ensemble. Can be specified using ${Property}. Required if IndependentTSList=*EnsembleID

Examples

See the automated tests.

A sample command file to process data from the State of Colorado’s HydroBase database is as follows:

# 08236000 - ALAMOSA RIVER ABOVE TERRACE RESERVOIR
08236000.DWR.Streamflow.Month~HydroBase
# 08236500 - ALAMOSA RIVER BELOW TERRACE RESERVOIR
08236500.DWR.Streamflow.Month~HydroBase
SetToMax(TSID="08236000.DWR.Streamflow.Month",IndependentTSList=SpecifiedTSID,IndependentTSID="08236500.DWR.Streamflow.Month")

Troubleshooting

See Also