are those selected with the SelectTimeSeries() command. AllTS TSID The time series identifier or alias for the time series to be modified, using the * wildcard character to match multiple
<br />time series. Required when TSList=*TSID EnsembleID The ensemble to be modified, if processing an ensemble. Required when TSList=EnsembleID. OutputFile The property file to write, as
<br />an absolute path or relative to the command file. None – must be specified. PropertyName The property name to write. None – must be specified. Append Indicates whether the property should
<br />be appended to the file (True) or overwrite the file (False). True A sample command file is as follows: WriteTimeSeriesProperty(OutputFile="Results/Example_WriteTimeSeriesProperty.txt",
<br />PropertyName="DataLimitsOriginal") Command Reference – WriteTimeSeriesProperty() -2 548
<br />Command Reference – WriteTimeSeriesToDataStore() -1 Command Reference: WriteTimeSeriesToDataStore() Write time series to a database datastore Version 10.21.00, 2013-06-28 The WriteTimeSeriesToDataSto
<br />re() command writes time series to the specified database datastore. This command can only write to databases that have a supported design structure. Currently this command is only available
<br />for generic datastores (see the Generic Database Datastore appendix for information about supported database designs and datastore configuration properties). This command cannot be used
<br />with web service datastores and use with Excel datastores has not been tested. This command is useful in particular for bulk data loading such as for database initialization and when
<br />tight integration with TSTool is not required or has not been implemented. The following dialog is used to edit the command and illustrates the syntax of the command. WriteTimeSeriesToDataStore
<br />WriteTimeSeriesToDataStore() Command Editor The command syntax is as follows: WriteTimeSeriesToDataStore(Parameter=Value,…) 549
<br />WriteTimeSeriesToDataStore() Command TSTool Documentation Command Reference – WriteTimeSeriesToDataStore() -2 Command Parameters Parameter Description Default TSList Indicates the list
<br />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
<br />the command. • EnsembleID – all time series in the ensemble will be processed. • FirstMatchingTSID – the first time series that matches the TSID (single TSID or TSID with wildcards)
<br />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
<br />with the SelectTimeSeries() command. AllTS TSID The time series identifier or alias for the time series to be processed, using the * wildcard character to match multiple time series.
<br />Required if TSList=*TSID. EnsembleID The ensemble to be processed, if processing an ensemble. Required if TSList= EnsembleID. OutputStart The date/time for the start of the output. Use
<br />the global output period. OutputEnd The date/time for the end of the output. Use the global output period. DataStore The name of a database datastore to receive data. None – must be
<br />specified. DataStore LocationType The location type to match in the datastore.. Location type from time series is used. DataStore DataSource The data source (provider) to match in the
<br />datastore. Data source from time series is used. DataStore DataType The data type to match in the datastore. Data type from time series is used. DataStore Interval The data interval
<br />to match in the datastore. Data interval from time series is used. DataStore Scenario The scenario to match in the datastore. Scenario from time series is used. DataStore MissingValue
<br />The value to write to the datastore to indicate a missing value in the time series. Specify null to write null to the database. Missing value used for the time series will be used (e.g.,
<br />NaN, -999). DataStoreUnits Units to use for time series in the database, currently not used. Time series data must match the time series as defined in the database. WriteMode The method
<br />used to write time series data records, recognizing the databases use insert and InsertUpdate 550
<br />TSTool Documentation WriteTimeSeriesToDataStore() Command Command Reference – WriteTimeSeriesToDataStore() -3 Parameter Description Default update SQL statements. Note that any insert/update
<br />actions only occur on exact matches of date/time, not on a period. For example, DeleteInsert only deletes records that match the specific date/time of a value in the time series. Specify
<br />WriteMode as: • DeleteAllThenInsert – delete all the data records for the time series and then insert the time series data records, useful for bulk loading • DeletePeriodThenInsert –
<br />delete the data records in the specified output period and then insert the time series data records, useful for bulk loading • DeleteInsert – delete the data first and then insert (all
<br />values will need to be matched to delete) • Insert – insert the data with no attempt to update if the insert fails • InsertUpdate – try inserting the data first and if that fails try
<br />to update • Update – update the data with no attempt to insert if the update fails • UpdateInsert – try updating the data first and if that fails try to insert 551
<br />WriteTimeSeriesToDataStore() Command TSTool Documentation Command Reference – WriteTimeSeriesToDataStore() -4 This page is intentionally blank. 552
<br />Command Reference – WriteTimeSeriesToJson() -1 Command Reference: WriteTimeSeriesToJson() Write time series to a JSON format file Version 10.21.00, 2013-07-01 This command is under development.
<br />The JSON format will change as feedback is received and additional time series information is added to the output (e.g., comments, properties). The WriteTimeSeriesToJson() command writes
<br />time series to a file using JSON (JavaScript Object Notation) format. The file can be included in a JavaScript script to instantiate data objects. The following example illustrates the
<br />format of the JSON file, with two hour-interval time series, one without data flags, and one with data flags. The JSON format closely matches time series data management conventions
<br />used by TSTool. In the future, support for writing time series data values in parallel (via overlap=true property for the list) may be implemented in order to save space in the file.
<br />JSON files can be viewed/edited by online tools such as http://jsoneditoronline.org. { "timeSeriesList": { "numTimeSeries": 2, "overlap": false, "timeSeries": [ { "timeSeriesMeta": {
<br />"tsid": "MyLoc1..MyDataType.Hour", "alias": "MyLoc1", "description": "Test data, pattern", "locationType": "", "locationId": "MyLoc1", "dataSource": "", "dataType": "MyDataType", "scenario":
<br />"", "missingVal": -999.0, "units": "CFS", "unitsOriginal": "CFS", "start": "1950-01-01 00", "end": "1950-01-03 12", "startOriginal": "1950-01-01 00", "endOriginal": "1950-01-03 12",
<br />"hasDataFlags": false }, "timeSeriesData": [ { "dt": "1950-01-01 00", "value": 5.0000 }, { "dt": "1950-01-01 01", "value": 10.0000 }, { "dt": "1950-01-01 02", "value": 12.0000 }, … omitted
<br />… { "dt": "1950-01-03 11", "value": 75.0000 }, { "dt": "1950-01-03 12", "value": 5.0000 } ] }, { "timeSeriesMeta": { "tsid": "MyLoc2..MyData.Hour", "alias": "MyLoc2", "description":
<br />"Test data, pattern", "locationType": "", "locationId": "MyLoc2", "dataSource": "", "dataType": "MyData", "scenario": "", "missingVal": -999.0, 553
<br />WriteTimeSeriesToJson() Command TSTool Documentation Command Reference – WriteTimeSeriesToJson() -2 "units": "CFS", "unitsOriginal": "CFS", "start": "1950-01-01 00", "end": "1950-01-04
<br />12", "startOriginal": "1950-01-01 00", "endOriginal": "1950-01-04 12", "hasDataFlags": true }, "timeSeriesData": [ { "dt": "1950-01-01 00", "value": 7.0000, "flag": "A" }, { "dt": "1950-01-01
<br />01", "value": 12.0000, "flag": "B" }, { "dt": "1950-01-01 02", "value": 14.0000, "flag": "" }, …omitted… { "dt": "1950-01-04 11", "value": -999.0000, "flag": "D" }, { "dt": "1950-01-04
<br />12", "value": 77.0000, "flag": "E" } ] } ] } } The following dialog is used to edit the command and illustrates the syntax of the command. WriteTimeSeriesToJson WriteTimeSeriesToJson()
<br />Command Editor 554
<br />TSTool Documentation WriteTimeSeriesToJson() Command Command Reference – WriteTimeSeriesToJson() -3 The command syntax is as follows: WriteTimeSeriesToJson(Parameter=Value,…) Command
<br />Parameters Parameter 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
<br />with wildcards) will be processed. • AllTS – all time series before the command. • EnsembleID – all time series in the ensemble will be processed. • FirstMatchingTSID – the first time
<br />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)
<br />will be processed. • SelectedTS – the time series are those selected with the SelectTimeSeries() command. AllTS TSID The time series identifier or alias for the time series to be processed,
<br />using the * wildcard character to match multiple time series. Required if TSList=*TSID. EnsembleID The ensemble to be processed, if processing an ensemble. Required if TSList= EnsembleID.
<br />OutputFile The JSON output file. The path to the file can be absolute or relative to the working directory (command file location). Global properties can be used to specify the filename,
<br />using the ${Property} syntax. None – must be specified. Precision The number of digits after the decimal for numerical output. 4 (in the future may default based on data type) MissingValue
<br />The value to write to the file to indicate a missing value in the time series, must be a number or NaN. As initialized when reading the time series or creating a new time series, typically
<br />-999, NaN, or another value that is not expected in data. OutputStart The date/time for the start of the output. Use the global output period. OutputEnd The date/time for the end of
<br />the output. Use the global output period. 555
<br />WriteTimeSeriesToJson() Command TSTool Documentation Command Reference – WriteTimeSeriesToJson() -4 This page is intentionally blank. 556
<br />Command Reference – WriteTimeSeriesToKml() -1 Command Reference: WriteTimeSeriesToKml() Write time series to a KML format file Version 10.21.00, 2013-07-01 This command is under development.
<br />Additional capabilities will be implemented as resources allow and requirements are identified. The WriteTimeSeriesToKml() command writes time series to a file using KML (Keyhole Markup
<br />Language) format (see: https://developers.google.com/kml/documentation). The file can be used with Google Earth, Google Maps, and other spatial viewing tools. This command currently
<br />provides very basic capabilities to visualize the locations where time series data are collected, in particular for point data. In the future the command will be updated to have additional
<br />features, including: • Providing the option to output the time series using the timestamp and timespan KML features. • Providing the option to specify style information with a table,
<br />for example using the data type to indicate the symbol and icon. • Providing additional time series properties for visualization. The following dialog is used to edit the command and
<br />illustrates the syntax of the command. WriteTimeSeriesToKml WriteTimeSeriesToKml() Command Editor The command syntax is as follows: WriteTimeSeriesToKml(Parameter=Value,…) 557
<br />WriteTimeSeriesToKml() Command TSTool Documentation Command Reference – WriteTimeSeriesToKml() -2 Command Parameters Parameter Description Default TSList Indicates the list of time series
<br />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.
<br />• EnsembleID – all time series in the ensemble will be processed. • FirstMatchingTSID – the first time series that matches the TSID (single TSID or TSID with wildcards) will be processed.
<br />• 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()
<br />command. AllTS TSID The time series identifier or alias for the time series to be processed, using the * wildcard character to match multiple time series. Required if TSList=*TSID. EnsembleID
<br />The ensemble to be processed, if processing an ensemble. Required if TSList= EnsembleID. OutputFile The KML output file. The path to the file can be absolute or relative to the working
<br />directory (command file location). Global properties can be used to specify the filename, using the ${Property} syntax. None – must be specified. Longitude Property The name of the time
<br />series property containing the longitude to use for the KML. Required. Latitude Property The name of the time series property containing the latitude to use for the KML. Required. Elevation
<br />Property The name of the time series property containing the elevation to use for the KML. 0 Precision The number of digits after the decimal for numerical output. Not currently enabled.
<br />4 (in the future may default based on data type) Missing Value The value to write to the file to indicate a missing value in the time series, must be a number or NaN. Not currently enabled.
<br />As initialized when reading the time series or creating a new time series, typically -999, NaN, or another value that is not expected in data. OutputStart The date/time for the start
<br />of the output, used with KML timestamp. Not currently enabled. Use the global output period. OutputEnd The date/time for the end of the output, used with KML timestamp. Not currently
<br />enabled. Use the global output period. 558
<br />Command Reference – WriteWaterML() -1 Command Reference: WriteWaterML() Write time series to a WaterML XML format file Version 10.05.00, 2012-03-06 This command is under development.
<br />In particular, an evaluation is determining how best to map internal time series properties to the WaterML specification, including selecting reasonable defaults while allowing override
<br />of defaults. The WriteWaterML() command writes time series to a WaterML XML format file. See the WaterML Input Type Appendix for more information about the file format. The following
<br />dialog is used to edit the command and illustrates the syntax of the command. WriteDateValue WriteDateValue() Command Editor The command syntax is as follows: WriteWaterML(Parameter=Value,…)
<br />Command Parameters Parameter Description Default TSList Indicates the list of time series to be processed, one of: • AllMatchingTSID – all time series that match the TSID (single TSID
<br />or TSID with wildcards) will be processed. • AllTS – all time series before the command. AllTS 559
<br />WriteWaterML() Command TSTool Documentation Command Reference – WriteWaterML() -2 • EnsembleID – all time series in the ensemble will be processed. • FirstMatchingTSID – the first time
<br />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)
<br />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,
<br />using the * wildcard character to match multiple time series. Required if TSList=*TSID. EnsembleID The ensemble to be processed, if processing an ensemble. Required if TSList= EnsembleID.
<br />OutputFile TheWaterML output file. The path to the file can be absolute or relative to the working directory (command file location). Global properties can be used to specify the filename,
<br />using the ${Property} syntax. None – must be specified. Version The WaterML version to write. Currenly only version 1.1 is supported. 1.1 Precision The number of digits after the decimal
<br />for numerical output. 4 (in the future may default based on data type) MissingValue The value to write to the file to indicate a missing value in the time series. As initialized when
<br />reading the time series or creating a new time series, typically -999, NaN, or another value that is not expected in data. OutputStart The date/time for the start of the output. Use
<br />the global output period. OutputEnd The date/time for the end of the output. Use the global output period. 560
<br />Documentation Binder Spine Labels This page, when printed, can be used for a spine in a binder. Colorado's Decision Support Systems (CDSS) TSTool – Time Series Tool – Command Reference
<br />561
<br />562
<br />
|