Output.system_series

Output.system_series(attribute=None, start=None, end=None, asframe=True)[source]

Get one or more a time series for one or more system attributes. Specify series start index and end index to get desired time range.

Parameters:
attribute: int | str | EnumMeta | Sequence[int | str | EnumMeta] | None

The attribute index or name.

On of:

air_temp, rainfall, snow_depth, evap_infil_loss, runoff_flow, dry_weather_inflow, gw_inflow, rdii_inflow, direct_inflow, total_lateral_inflow, flood_losses, outfall_flows, volume_stored, evap_rate.

defaults to None.

Can also input the integer index of the attribute you would like to pull or the actual enum from Output.system_attributes.

Setting to None indicates all attributes.

start_index: Union[str, int, datetime, None], optional

The start datetime or index of from which to return series, defaults to None.

Setting to None indicates simulation start.

end_index: Union[str, int, datetime, None], optional

The end datetime or index of from which to return series, defaults to None.

Setting to None indicates simulation end.

asframe: bool

switch to return an indexed DataFrame. Set to False to get an array of values only, defaults to True

Returns:
Union[pd.DataFrame,np.ndarray]

DataFrame or ndarray of attribute values in each column for request date range

Examples

Pull two system attribute time series

>>> from swmm.pandas import Output,example_out_path
>>> out = Output(example_out_path)
>>> out.system_series(['total_lateral_inflow','rainfall'])
                     total_lateral_inflow  rainfall
datetime
1900-01-01 00:05:00              0.902807   0.03000
1900-01-01 00:10:00              0.902800   0.03000
1900-01-01 00:15:00              0.902793   0.03000
1900-01-01 00:20:00              0.902786   0.03000
1900-01-01 00:25:00              0.902779   0.03000
...                                   ...       ...
1900-01-01 23:40:00              1.431874   0.03224
1900-01-01 23:45:00              1.431869   0.03224
1900-01-01 23:50:00              1.431876   0.03224
1900-01-01 23:55:00              1.431894   0.03224
1900-01-02 00:00:00              1.431921   0.00000
[288 rows x 2 columns]