Skip to content

TSTool / Command / ReadTimeSeries


The ReadTimeSeries reads a single time series using the time series identifier to uniquely identify the time series. This generalized command is useful for converting time series identifiers from the TSTool interface into read commands that assign an alias to a time series. Because the command is generic, it does not offer specific parameters that may be found in read commands for specific input types. Use the specific read commands where available for additional functionality and more specific error handling. See also the ReadTimeSeriesList command.

Command Editor

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


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

Command Syntax

The command syntax is as follows:


The following older command syntax is updated to the above syntax when a command file is read:

TS Alias = ReadTimeSeries (Parameter=Value,...)

Command Parameters

Parameter            Description Default                           
The time series identifier of the time series to read. The identifier should include the input type (and input name, if required). See the input type appendices for examples of time series identifiers for various input types. Can be specified using ${Property} notation. None – must be specified.
The alias to assign to the time series, as a literal string or using the special formatting characters listed by the command editor. The alias is a short identifier used by other commands to locate time series for processing, as an alternative to the time series identifier (TSID). None – must be specified.
IfNotFound Indicates how to handle missing time series, one of:
  • Warn – generate fatal warnings and do not include in output.
  • Ignore – generate non-fatal warnings and do not include in output.
  • Default – generate non-fatal warnings and create empty time series for those that could not be found. This requires that a SetOutputPeriod command be used before the command to define the period for default time series.
DefaultUnits Default units when IfNotFound=Default. Blank – no units.


See the automated tests.

A sample command file to read a time series from the State of Colorado’s HydroBase database is as follows:



See Also