Skip to content

TSTool / Command / WriteDateValue


The WriteDateValue command writes time series to the specified DateValue format file. See the DateValue Input Type Appendix for more information about the file format. The time series being written must have the same data interval – use the TSList parameter to select appropriate time series.

Command Editor

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


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

Command Syntax

The command syntax is as follows:


Command Parameters

Parameter                   &nbsp     ;            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.
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 to be processed, if processing an ensemble. Can be specified using ${Property}. Required if TSList=*EnsembleID
OutputFile The DateValue output file. The path to the file can be absolute or relative to the working directory (command file location). Can be specified using processor ${Property}. None – must be specified.
WriteSeparateFiles Indicate whether separate files should be written (True) or a single file (False). Use time series % specifiers (e.g., %L for location) or properties ${ts:Property} in the OutputFile to ensure unique output file names. False
Delimiter The delimiter character to use between data values. Comma is the only other allowed value other than the default space and is recommended for irregular time series, which are output as blanks when date/times don’t align with other time series. Space
Precision The number of digits after the decimal for numerical output. 4 or if set for time series (in the future may default based on units).
MissingValue The value to write to the file to indicate a missing value in the time series. As initialized when reading the time series or creating a new time series, typically -999, NaN, etc.
IncludeProperties A list of time series property names to write, separated by commas, as of Version=1.6. Use * as a wildcard to match multiple properties. None.
WriteHeaderComments Indicate whether output file header comments should be written:
  • None - no comments will be written
  • Minimal - only comments that indicate file creator, time, etc. will be written
  • Supplied - same as Minimal with comments supplied by the HeaderComments parameter
  • Full - all comments will be written
HeaderComments Comments to write to the output file header, in addition to auto-generated standard comments (see the WriteHeaderComments parameter). # will automatically be added to the front of each line if not already used. Use \n or Enter in the editor to insert new lines. Double quotes can be used and will be replaced with \" in the command parameter in order to not conflict with parameter surrounding quotes. Can be specified using processor ${Property}. No additional comments are included.
WriteDataFlags Indicate whether data flags should be written: True or False. True if times series have data flags, False if not.
WriteDataFlagDescriptions Indicate whether data flag descriptions should be written using True or False, as of Version=1.6. False
OutputStart The date/time for the start of the output as a date/time string or ${Property}. Use the global output period.
OutputEnd The date/time for the end of the output as a date/time string or ${Property}. Use the global output period.
IrregularInterval The interval (e.g., Day) used when writing irregular time series, to indicate the precision of date/times. This may be necessary when it is not possible to automatically determine the date/time precision. The date/time precision to format output is assumed to be Minute if unknown; however, specifying the irregular interval will inform the data processing. Determined from the period start date/time of each time series, defaulting to Minute where the date/time precision is set to “irregular” (unknown).
Version Version of the file to write. See the DateValue Input Type appendix for information. Current version.


See the automated tests.


See Also