Output.system_attribute¶
- Output.system_attribute(time, attribute=None, asframe=True)[source]¶
For all nodes at given time, get a one or more attributes.
- Parameters:
- time: Union[str, int, datetime]
The datetime or simulation index for which to pull data, defaults to None.
- attribute: Union[int, str, Sequence[Union[int, str]], 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.
- asframe: bool
A 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]
A DataFrame of attribute values in each column for requested simulation time.
Examples
Pull all system attributes for the 10th time step
>>> from swmm.pandas import Output,example_out_path >>> out = Output(example_out_path) >>> out.system_attribute(10) result attribute air_temp 70.000000 rainfall 0.030000 snow_depth 0.000000 evap_infil_loss 0.015042 runoff_flow 0.066304 dry_weather_inflow 0.801000 gw_inflow 0.101737 rdii_inflow 0.000000 direct_inflow 0.000000 total_lateral_inflow 0.969041 flood_losses 0.000000 outfall_flows 0.944981 volume_stored 1731.835938 evap_rate 0.000000 ptnl_evap_rate 0.000000