source: Innovyze Support Portal
Gauged inflow can bring in flow data saved in text file as the data source into XPSWMM. This option is flexible and easy to understand. Unless you are dealing with very large dataset, this should be the preferred option.
Prepare
To setup gauged inflow, first prepare your flow data in a text format. CSV is a good format since it is supported by Excel. The csv file should have the following information,
- Date and Time: it can be one or several columns
- Flow: the flow field
- Station: the station field, you can have multiple flow time series saved in the same file.
As shown below,
- check “Gauged Inflow”
- Select a “File Format”, and the station name
- Define the “File Format”
- Map each column, for date time fields define the format
Review
It is recommended to setup an XPTable to review your settings,
- check the variables
- bring in all the “Gauged Input Data” columns
- Bring in the flag of gauged flow
Package
One of the drawbacks of using external files is that the modeler needs to package the external files with the model when sharing with other people. XPSWMM made it easy with the transmit model tool. The “Transmit Model” tool will check the external sources and package the files in the zip file.
The sample model can be downloaded from Github.
If you are interested using python to batch import the gauged flow, here is the code.