TSTool / Command / AddConstant
AddConstant command adds a constant value to each data value in a time series
(or ensemble of time series) within the specified period.
This command is useful, for example,
when a time series needs to be adjusted for a constant bias.
Another example is to adjust a reservoir total volume time series by the dead pool
storage in order to compute the active storage (or inverse).
Missing data values will remain missing in the result.
The following dialog is used to edit the command and illustrates the syntax of the command.
AddConstant Command Editor (see also the full-size image)
The command syntax is as follows:
||Indicates the list of time series to be processed, one of:
||The time series identifier or alias for the time series to be processed, using the
||The ensemble to be processed, if processing an ensemble. Can be specified using
|The data value to add to the time series. Can be specified using processor
||None – must be specified.|
||The date/time to start analyzing data. Can be specified using processor
||The date/time to end analyzing data. Can be specified using processor
See the automated tests.
A sample command file to process a time series from the State of Colorado’s HydroBase database is as follows:
# 2003536 - CONTINENTAL RES 2003536.DWR.ResMeasStorage.Day~HydroBase AddConstant(TSList=AllMatchingTSID,TSID="2003536.DWR.ResMeasStorage.Day",ConstantValue=5000)