Skip to content

TSTool / Command Reference / Overview

This reference section of the documentation provides information about TSTool commands, listed in groups consistent with the TSTool software menus. If necessary, use the documentation Search tool or the Find tool for the web browser to find a specific command or topic.

Reference documentation for commands is being transferred from the original Word versions. The current Word "Chapter 4 - Commmands" can likely merge into this page since content is just screen shots of menus and overview comments about command groups. Refer to the PDF documentation distributed with TSTool and available online if documentation is not available below. Commands that don't have a description after the name do not have documentation included here.


Command Syntax Overview

TSTool command files contain a list of commands, one command per line. These commands are processed in sequence from top to bottom. For and If control commands, if present, will cause execution order to jump over commands.

Each command adheres to the syntax:

CommandName(ParameterName1="ParameterValue1",ParameterName2="ParameterValue2",...)

The following are guidelines for commands:

  1. Commands always follow the convention of command name at start with a list of named parameters in parentheses. The only exceptions are:
    1. Comments starting with #.
    2. Block comments /* and */ that surround one or more command lines.
    3. Command such as Exit, which will always have empty list of parameters in the parentheses.
  2. Commands are generally not case-specific although the TSTool software enforces standards.
  3. Command and parameter names use mixed case where the first letter of each word is capitalized.
  4. Parameter values may optionally be surrounded by double quotes, regardless of type. Double quotes are required in some cases to protect spaces and other characters within quotes.
  5. Each command must exist on a single line.
  6. Spaces at the front of a command for indentation are currently not allowed. This limitation is planned to be removed in the future. Tabs used for indentation are discouraged and will likely be prohibited because tab width is ambiguous between different users and tools. Spaces will be the preferred method of indentation.
  7. Empty (blank) lines are allowed and will be handled as Empty commands.
  8. Unknown commands are handled as UnknownCommand commands.

Time Series Processing

Time series processing commands focus on time series, although other outputs such as tables and files may result from processing. Older commands assumed that only time series would be processed and have general names (e.g., Copy), whereas newer commands recognize that other objects may be processed and have more specific names (e.g., SelectTimeSeries).

Select, Free, Sort Time Series

These commands select, free, and sort time series.

Create Time Series

These commands create new time series from other time series or data values.

Read Time Series

These commands read time series from various sources.

Fill Time Series Missing Data

These commands fill missing time series values.

Set Time Series Contents

These commands set time series contents, including properties and data values.

Manipulate Time Series

These commands perform basic time series manipulation.

Analyze Time Series

These commands analyze time series.

Models - Routing

These commands route flow time series from one location to another.

Output Time Series

These commands output time series to different formats.

Check Time Series

These commands are used to check time series, for example for quality control.

Topic Area Commands

The following commands are grouped into specific topic areas.

Datastore Processing

These commands handle reading and writing time series and other data from datastores, in particular databases. Utility commands for executing SQL and creating a data dictionary are also provided.

Ensemble Processing

Network Processing

Spatial Processing

Spreadsheet Processing

Template Processing

Visualization Processing

General Commands

General commands perform tasks that are general in nature, meaning they are not specific to processing time series, tables, or other specific data types.

General - Comments

These commands are used to insert comments into command files.

General - File Handling

These commands provide general file handling capabilities.

General - Logging and Messaging

These commands handle run-time configuration of logging and sending messages.

General - Running and Properties

These commands provide general capabilities to control running commands, including running programs external to TSTool, handling processor properties (used with ${Property}), and control commands such as For and If.

General - Test Processing

These commands are used to run automated tests, in particular when running the full suite of tests.

Deprecated Commands

"Deprecated" commands are obsolete and have typically been replaced by other commands. These commands are generally quite old and may be removed at some point.

Table Commands

Table commands are used to process tabular data, for example:

  • database tables
  • Excel worksheets
  • delimited and other data files

Tables are converted to an in-memory representation where each column stores a single data type. Tables and time series can be converted back and forth, as needed.

Create, Copy, Free Table

These commands create, copy, and free tables.

Read Table

These commands read tables from various sources.

Append, Join Tables

These commands append and join tables.

Table, Time Series Processing

These commands convert between tables and time series.

Manipulate Tables

These commands manipulate tables.

Analyze Table

These commands analyze tables.

  • CompareTables - compare tables to detect whether they are the same or different

Output Table

These commands write tables to various formats.

Running and Properties

These commands handle table properties, which are used to control run logic.

Plugin Commands

Plugin commands are an experimental TSTool feature, designed to allow commands to be added to TSTool independent of the main TSTool distribution. This will allow third parties to add custom commands to TSTool.

Command List

The following table contains every command and provides summary information that is useful to software users and developers. "Documentation Migrated" indicates whether the original Word version of documentation have been migrated to the new online version (this documentation).

This table needs to be completed for all commands.

Command                                                       Description Doc. Status Def. to Rel. Path
# comment Single line comment. Migrated
\* comment block start Start of multi-line comment block. Migrated
\* comment block end End of multi-line comment block. Migrated
Add Add time series to time series. Migrated
AddConstant Add a constant to time series values. Migrated
AdjustExtremes Adjust extreme values in time series. Migrated
AnalyzeNetworkPointFlow Perform point flow analysis for a network. Migrated
AnalyzePattern Analyze pattern of time series data. Migrated
AppendFile Append a file to another file. Migrated
AppendTable Append a table to another table. Migrated
ARMA Not yet migrated (placeholder)
Blend Blend one time series into another. Migrated
CalculateTimeSeriesStatistic Not yet migrated (placeholder)
ChangeInterval Not yet migrated (placeholder)
ChangePeriod Change time series data period. Migrated
ChangeTimeZone Change the time zone for time series. Migrated
CheckTimeSeries Check time series values against criteria. Migrated
CheckTimeSeriesStatistic Check time series statistic against criteria. Migrated
CloseDataStore Close an open datastore. Migrated
CloseExcelWorkbook Close Excel workbook that is open. Migrated
CompareFiles Compare files to detect whether they are the same or different. Migrated
CompareTables Compare tables to detect whether they are the same or different. Migrated
CompareTimeSeries Compare time series to detect whether they are the same or different. Migrated
ComputeErrorTimeSeries Compute the error between two time series. Migrated
ConfigureLogging Configure logging. Migrated
ConvertDataUnits Convert time series data units. Migrated
Copy Copy a time series. Migrated
CopyEnsemble Copy an ensemble to a new ensemble. Migrated
CopyFile Copy a file to another name. Migrated
CopyPropertiesToTable Command is under development. Not yet migrated
CopyTable Copy a table to a new table. Migrated
CopyTimeSeriesPropertiesToTable Copy time series properties to a table. Migrated
CreateDataStoreDataDictionary Create a database data dictionary. Migrated
CreateEnsembleFromOneTimeSeries Create an ensemble from a time series. Migrated
CreateFromList Create time series from a list in a file. Migrated
CreateNetworkFromTable Create a network from a table. Migrated
CreateRegressionTestCommandFile Create regression test suite command file. Migrated
CreateTimeSeriesEventTable Create an event table associated with time series. Migrated
Cumulate Set time series values to cumulative values. Migrated
DeleteDataStoreTableRows Delete datastore table rows. Migrated
DeleteTableColumns Delete columns from a table. Migrated
DeleteTableRows Delete rows from a table. Migrated
Delta Create a new time series from delta between time series values. Migrated
DeselectTimeSeries Deselect output time series for processing. Migrated
Disaggregate Create a new time series by disaggregating a time series. Migrated
Divide Divide one time series by another. Migrated
Empty Empty (blank) commands line. Migrated
EndFor End of For loop. Migrated
EndIf End of If loop. Migrated
Exit Stop processing commands. Migrated
ExpandTemplateFile Expand template file into full file. Migrated
FillCarryForward Replaced by FillRepeat. NA
FillConstant Fill missing time series values with a constant. Migrated
FillDayTSFrom2MonthTSAnd1DayTS Fill a daily time series by prorating monthly volumes using a daily pattern. Migrated
FillFromTS Fill missing time series values from another time series. Migrated
FillHistMonthAverage Fill missing time series values with historical monthly average. Migrated
FillHistYearAverage Fill missing time series values with historical yearly average. Migrated
FillInterpolate Fill missing time series values using interpolation. Migrated
FillMixedStation Not yet migrated (placeholder)
FillMOVE1 Not yet migrated (placeholder)
FillMOVE2 Not yet migrated (placeholder)
FillPattern Fill missing time series values using historical pattern average. Migrated
FillPrincipalComponentAnalysis Not yet migrated (placeholder)
FillProrate Fill missing time series values by prorating another time series. Migrated
FillRegression Not yet migrated (placeholder)
FillRepeat Fill missing time series values by repeating values. Migrated
FillUsingDiversionComments Fill missing time series values using HydroBase diversion comments. Migrated
For Iterate over items in a loop. Migrated
FormatDateTimeProperty Format a date/time processor property. Migrated
FormatStringProperty Format string processor property. Migrated
FormatTableDateTime Format a date/time in a table. Migrated
FormatTableString Format a string in a table. Migrated
Free Free memory used by time series. Migrated
FreeTable Free memory resources for a table. Migrated
FTPGet Download a file from an FTP site. Migrated
If Test a condition to control logic flow. Migrated
InsertTableColumn Insert a column in a table. Migrated
InsertTableRow Insert a row in a table. Migrated
InsertTimeSeriesIntoEnsemble Insert a time series into an ensemble. Migrated
JoinTables Join two tables. Migrated
LagK Lag and attenuate flows. Migrated
ListFiles List files in a folder. Migrated
LookupTimeSeriesFromTable Create a time series by looking up data values from a table. Migrated
ManipulateTableString Manipulate a string in a table. Migrated
Message Output a message to the log file. Migrated
Multiply Multiply one time series by another. Migrated
NewDayTSFromMonthAndDayTS Create a new daily time series by distributing a monthly time series using a daily pattern. Migrated
NewDerbyDatabase Command is under development
NewEndOfMonthTSFromDayTS Create a new end of month time series from daily time series. Migrated
NewEnsemble Create a new time series ensemble. Migrated
NewExcelWorkbook Create a new Excel workbook file. Migrated
NewPatternTimeSeries Create a new time series with repeating pattern for data values. Migrated
NewStatisticMonthTimeSeries Create a new time series with monthly statistics. Migrated
NewStatisticEnsemble Create an ensemble of static time series. Migrated
NewStatisticTimeSeries Create a new time series having statistic repeated each year. Migrated
NewStatisticTimeSeriesFromEnsemble Not yet migrated (placeholder)
NewStatisticYearTS Create a new time series of annual statistics. Migrated
NewTable Create a new table. Migrated
NewTimeSeries Create a new time series. Migrated
NewTreeView Create a tree view in the user interface. Migrated
Normalize Create new time series by normalizing a time series. Migrated
OpenCheckFile Not yet migrated (placeholder)
OpenHydroBase Open a HydroBase database connection. Migrated
PrintTextFile Print text file to a printer. Migrated
ProcessRasterGraph Process (create) time series raster graph. Migrated
ProcessTSProduct Process (create) time series data product. Migrated
ProfileCommands Create summary table with containing performance data Migrated
ReadColoradoHydroBaseRest Read time series from State of Colorado HydroBase REST web services Migrated
ReadDateValue Read time series from a DateValue file. Migrated
ReadDelftFewsPiXml Read time series from Delft FEWS PI XML file. Migrated
ReadDelimitedFile Read time series from delimited file. Migrated
ReadExcelWorkbook Read Excel workbook file. Migrated
ReadHecDss Read time series from HEC-DSS file Migrated
ReadHydroBase Read time series from State of Colorado HydroBase database Migrated
ReadMODSIM Read time series from MODSIM model file. Migrated
ReadNrcsAwdb Read time series from NRCS AWDB web services Migrated
ReadNwsCard Not yet migrated (placeholder)
ReadNwsrfsEspTraceEnsemble Not yet migrated (placeholder)
ReadNwsrfsFS5Files Not yet migrated (placeholder)
ReadPatternFile Read time series used by ReadPatternFile Migrated
ReadPropertiesFromExcel Read processor properties from Excel. Migrated
ReadPropertiesFromFile Read processor properties from a file. Migrated
ReadRccAcis Read time series from RCC ACIS web service. Migrated
ReadReclamationHDB Read time series from Reclamation HDB database Migrated
ReadReclamationPisces Read time series from Reclamation Pisces database Migrated
ReadRiversideDB Not yet migrated (placeholder)
ReadRiverWare Read time series from RiverWare file Migrated
ReadStateCU Read time series from a StateCU file. Migrated
ReadStateCUB Read time series from a StateCU binary file. Migrated
ReadStateMod Read time series from a StateMod file. Migrated yes
ReadStateModB Read time series from a StateMod binary file. Migrated
ReadTableCellsFromExcel Read table cells from Excel worksheet. Migrated
ReadTableFromDataStore Read a table from a datastore. Migrated
ReadTableFromDBF Read a table from a DBF file. Migrated
ReadTableFromDelimitedFile Read a table from a delimited file. Migrated
ReadTableFromExcel Read a table from an Excel workbook file. Migrated
ReadTableFromFixedFormatFile Read a table from a fixed-format file. Migrated
ReadTableFromJSON Read a table from a JSON file. Migrated
ReadTableFromXml Read a table from an XML file. Migrated
ReadTimeSeries Read a single time series using TSID to determine data source. Migrated
ReadTimeSeriesFromDataStore Read time series from a datastore. Migrated
ReadTimeSeriesList Read time series from a list in a table. Migrated
ReadUsgsNwisDaily Read daily value time series from USGS NWIS Daily web services Migrated
ReadUsgsNwisGroundwater Read groundwater time series from USGS NWIS Groundwater web services Migrated
ReadUsgsNwisInstantaneous Read instantaneous value time series from USGS NWIS Instantaneous web services Migrated
ReadWaterML Not yet migrated (placeholder)
ReadWaterML2 Not yet migrated (placeholder)
ReadWaterOneFlow Not yet migrated (placeholder)
ReadUsgsNwisRdb Read time series from a USGS NWS RDB file Migrated
RelativeDiff Create a new time series as relative difference of two time series. Migrated
RemoveFile Remove a file. Migrated
ReplaceValue Replace values in time series data. Migrated
ResequenceTimeSeriesData Resequence time series data values by year. Migrated
RunCommands Run a TSTool command file. Migrated
RunDSSUTL Run HEC-DSS DSSUTL program. Migrated
RunningAverage Replaced by RunningStatisticTimeSeries NA
RunningStatisticTimeSeries Create time series containing statistic from moving "running" sample. Not yet migrated (placeholder)
RunProgram Run a program. Migrated
RunPython Run a python program. Migrated
RunSql Run an SQL statement on a datastore. Migrated
Scale Scale time series values. Migrated
SelectTimeSeries Select output time series for processing. Migrated
SendEmailMessage Send an email message. Migrated
SetAutoExtendPeriod Set global property to auto-extend time series to output period. Migrated
SetAveragePeriod Set the global period used to compute historical averages. Migrated
SetConstant Set time series data values to a constant. Migrated
SetConstantBefore Replaced by SetConstant NA
SetDataValue Set data values in time series. Migrated
SetDebugLevel Set the debug level for logging. Migrated
SetEnsembleProperty Set an ensemble property. Migrated
SetExcelCell Set data in an Excel cell. Migrated
SetExcelWorksheetViewProperties Set Excel worksheet view properties. Migrated
SetFromTS Set time series data values from another time series. Migrated
SetIgnoreLEZero Set global property to ignore time series values <=0 in averages. Migrated
SetIncludeMissingTS Set the global property to include missing time series in output. Migrated
SetInputPeriod Set the global processor input period. Migrated
SetOutputPeriod Set the global processor output period. Migrated
SetOutputYearType Set the global processor output year type. Migrated
SetPatternFile Replaced by ReadPatternFile command NA
SetProperty Set processor property value. Migrated
SetPropertyFromNwsrfsAppDefault Not yet migrated (placeholder)
SetPropertyFromEnsemble Set processor property from ensemble. Migrated
SetPropertyFromTable Set processor property from a table. Migrated
SetPropertyFromTimeSeries Set processor property from time series property. Migrated
SetTableValues Set values in a table. Migrated
SetTimeSeriesPropertiesFromTable Set time series properties from table values. Migrated
SetTimeSeriesProperty Set a time series property. Migrated
SetTimeSeriesValuesFromLookupTable Set time series values from a lookup table. Migrated
SetTimeSeriesValuesFromTable Set time series values from a table. Migrated
SetToMax Set time series values to maximum of 1+ time series. Migrated
SetToMin Set time series values to minimum of 1+ time series. Migrated
SetWarningLevel Set the warning level for logging. Migrated
SetWorkingDir Set the working directory (folder) for following commands. Migrated
ShiftTimeByInterval Shift time series data values by a time interval. Migrated
SortTable Sort table contents. Migrated
SortTimeSeries Sort the output time series. Migrated
SplitTableColumn Split a table column into multiple columns. Migrated
SplitTableRow Split a table row into multiple rows. Migrated
StartLog (Re)start the log file. Migrated
StartRegressionTestResultsReport Start the regression test results report file to record output of tests. Migrated
StateModMax Create time series that are maximum of two StateMod files. Migrated
Subtract Subtract time series from time series. Migrated
TableMath Perform simple math on table columns. Migrated
TableTimeSeriesMath Perform simple math on a table and time series. Migrated
TableToTimeSeries Create time series from a table. Migrated
TimeSeriesToTable Copy time series to a table. Migrated
TSID Time series identifier (TSID), causes time series to be read. Migrated
UnknownCommand Unknown command. Migrated
UnzipFile Unzip the contents of a zip file. Migrated
VariableLagK Lag and attenuate flows. Migrated
Wait Wait for at time before continuing. Migrated
WebGet Download a file from a URL. Migrated
WeightTraces Create time series as weighted sum of ensemble traces. Migrated
WriteCheckFile Write command log to file. Migrated
WriteCommandSummaryToFile Write summary of command log to a file. Migrated
WriteDateValue Write time series to DateValue format file. Migrated
WriteDelftFewsPiXml Write time series to a Delft FEWS PI XML file. Migrated
WriteDelimitedFile Write time series from delimited file. Migrated
WriteHecDss Write time series to a HEC-DSS file. Migrated
WriteNwsCard Not yet migrated (placeholder)
WriteNWSRFSESPTraceEnsemble Not yet migrated (placeholder)
WritePropertiesToFile Write processor properties to a file. Migrated
WriteReclamationHDB Write time series to Reclamation HDB database Migrated
WriteRiversideDB Not yet migrated (placeholder)
WriteRiverWare Write time series to a RiverWare file. Migrated
WriteSHEF Write time series to SHEF file. Migrated
WriteStateCU Write time series to a StateCU file. Migrated
WriteStateMod Write time series to a StateMod file. Migrated
WriteSummary Write time series to a summary report file. Migrated
WriteTableCellsToExcel Write table row cells to an Excel worksheet. Migrated
WriteTableToDataStore Write a table to a datastore. Migrated
WriteTableToDelimitedFile Write a table to delimited file. Migrated
WriteTableToExcel Write a table to an Excel workbook file. Migrated
WriteTableToGeoJSON Write a table to a GeoJSON file. Migrated
WriteTableToHTML Write a table to an HTML file. Migrated
WriteTableToKml Write a table to a KML file. Migrated
WriteTableToShapefile Write a table to a shapefile. Migrated
WriteTimeSeriesPropertiesToFile Write time series properties to a file. Migrated
WriteTimeSeriesToDataStore Write time series to a datastore. Migrated
WriteTimeSeriesToDataStream Write time series to a stream of data lines. Migrated
WriteTimeSeriesToExcel Write time series to an Excel workbook. Migrated
WriteTimeSeriesToExcelBlock Write time series to an Excel workbook using block format. Migrated
WriteTimeSeriesToGeoJSON Write time series to a GeoJSON file. Migrated
WriteTimeSeriesToHydroJSON Write time series to a HydroJSON file. Migrated
WriteTimeSeriesToJson Write time series to a JSON file. Migrated
WriteTimeSeriesToKml Write time esries to a KML file. Migrated
WriteWaterML Not yet migrated (placeholder)
WriteWaterML2 Not yet migrated (placeholder)