Skip to content

TSTool / Command / CreateNetworkFromTable


Overview

The CreateNetworkFromTable command creates a network object from a table. Support for network objects is being phased into TSTool to allow processing of time series that are related to networks, such as river flow networks.

The following figure is taken from the AnalyzeNetworkPointFlow command documentation for illustration. However, the network created by the CreateNetworkFromTable command does not have knowledge of node type or calculations – this may be enhanced later.

AnalyzeNetworkPointFlow_Diagram

Node-based Network (see also the full-size image)

The network is defined by simple “NodeID” and “DownstreamNodeID” notation and can be applied to either point-based networks (such as river networks with stations/sites) or area-based networks (such as upstream and downstream basins).

The following example shows a network that is defined in Excel as a table containing a list of node identifiers with associated properties. The NodeID and DownstreamNodeID columns are used by the command to create a navigable network object in program memory. The network can then be used with commands such as SelectTimeSeries to select time series that were read for the network.

AnalyzeNetworkPointFlow_InputTable

Network Definition Input Table (see also the full-size image)

Command Editor

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

CreateNetworkFromTable_General

CreateNetworkFromTable Command Editor for General Parameters (see also the full-size image)

The following dialog is used to edit the command and illustrates the syntax of the command for parameters that map table columns to network node types.

CreateNetworkFromTable_Map

CreateNetworkFromTable Command Editor for Parameters that Map Table Columns to Network Nodes (see also the full-size image)

The following dialog is used to edit the command and illustrates the syntax of the command for parameters that define node behavior.

CreateNetworkFromTable_Behavior

CreateNetworkFromTable Command Editor for Parameters that Define Node Behavior (see also the full-size image)

Command Syntax

The command syntax is as follows:

CreateNetworkFromTable(Parameter="Value",...)

Command Parameters

Parameter                                Description Default                           
NetworkID
required
Identifier for the network being created. None – must be specified.
NetworkName
required
Descriptive name for network being created. None – must be specified.
DefaultDownstreamNodeID
required
Default downstream node identifier to ensure that the network can connect to a final downstream node. None – must be specified.
TableID
required
The identifier for the table defining the network. None – must be specified.
NodeIDColumn
required
The name of the column in the network table containing node identifiers. Node identifiers will be used for the location ID part of time series identifiers. None – must be specified.
NodeNameColumn The name of the column in the network table containing node names.
NodeTypeColumn
required
The name of the column in the network table containing node types. The node type is used to specify what calculations will occur for the node. Currently not used. None – must be specified.
NodeGroupColumn Used to group nodes, for example a stream reach or larger drainage basin. Currently not used.
NodeDistanceColumn The name of the column in the network table containing node distance. The distance is the measure from the most downstream node and is used when GainMethod=Distance or GainMethod=DistanceWeight.Currently not used.
NodeWeightColumn The name of the column in the network table containing node weights, which is used to distribute gain/loss when GainMethod=Weight or GainMethod=DistanceWeight (in the latter case the weight is the rate to use). Currently not used.
DownstreamNodeIDColumn The name of the column in the network table containing downstream node identifiers. This information defines the connectivity of the network. None – must be specified.
NodeAddTypes Node types for which time series are added to the node’s inflow to compute outflow, for example the Return node type in the above table example. The NodeTypeColumn table column is checked to determine the type for each node in the network. Currently not used. No additions will occur.
NodeAddDataType The time series data type to match for the node. The data type is used with the NodeID as the location ID to match available time series to use as input. The TSIDColumn will override the default matching. Currently not used. No additions will occur.
NodeSubtractTypes Node types for which time series are subtracted from the node’s inflow, for example the Diversion node type in the above table example. The NodeTypeColumn table column is checked to determine the type for each node in the network. Currently not used. No subtractions will occur.
NodeSubtractDataType The time series data type to match for the node. The data type is used with the NodeID as the location ID to match available time series to use as input. The TSIDColumn will override the default matching. Currently not used. No subtractions will occur.
NodeOutflowTypes Node types for which time series outflows are set to the node’s time input time series, for example the Streamflow node type in the above table example. The NodeTypeColumn table column is checked to determine the type for each node in the network. Currently not used. No known flows will be set – gain/loss cannot be computed.
NodeOutflowDataType The time series data type to match for the node. The data type is used with the NodeID as the location ID to match available time series to use as input. The TSIDColumn will override the default matching. Currently not used. See above.
NodeFlowThroughTypes Node types for which time series outflows are set to the node’s inflow, for example the InstreamFlow node type in the above table example. The NodeTypeColumn table column is checked to determine the type for each node in the network. Currently not used. No known flows will be set – gain/loss cannot be computed.

Examples

See the automated tests.

Troubleshooting

See Also