swmmtoolbox.swmmtoolbox.extract¶
- swmmtoolbox.swmmtoolbox.extract(filename, *labels)¶
Get the time series data for a particular object and variable.
- Parameters:
filename (str) – Filename of SWMM output file. The SWMM model must complete successfully for “swmmtoolbox” to correctly read it.
labels (str) –
The remaining arguments uniquely identify a time-series in the binary file. The format is:
'TYPE,NAME,VAR'
For example: ‘link,41a,Flow_rate node,C63,1 …’
The VAR part of the label can be the name of the variable or the index. The available variables and their indices can be found using:
'swmmtoolbox listvariables filename.out'
All of the available labels can be listed with:
'swmmtoolbox catalog filename.out'
There is a wild card feature for the labels, where leaving the part out will return all labels that match all other parts. For example,
link,b52,
Return all variables for link “b52”
link,,Flow_rate
Return “Flow_rate” for all links
Note that all labels require two commas and no spaces.