pywfm.IWFMModel.get_stream_flow_at_location#

IWFMModel.get_stream_flow_at_location(stream_node_id, flow_conversion_factor=1.0)#

Return stream flow at a stream node for the current time step in a simulation

Parameters:
  • stream_node_id (int) – stream node ID where flow is retrieved

  • flow_conversion_factor (float, default=1.0) – conversion factor for stream flows from the simulation units of volume to a desired unit of volume

Returns:

stream flow at specified stream node

Return type:

float

Note

This method is designed for use when is_for_inquiry=0 to return a stream flow at the current timestep during a simulation.

See also

IWFMModel.get_stream_inflows_at_some_locations

Return stream boundary inflows at a specified set of inflow locations listed by their indices for the current simulation timestep

IWFMModel.get_stream_flows

Return stream flows at every stream node for the current timestep

IWFMModel.get_stream_stages

Return stream stages at every stream node for the current timestep

Example

>>> from pywfm import IWFMModel
>>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN'
>>> sim_file = 'Simulation_MAIN.IN'
>>> model = IWFMModel(pp_file, sim_file, is_for_inquiry=0)
>>> while not model.is_end_of_simulation():
...     # advance the simulation time one time step forward
...     model.advance_time()
...
...     # read all time series data from input files
...     model.read_timeseries_data()
...
...     # Simulate the hydrologic process for the timestep
...     model.simulate_for_one_timestep()
...
...     # print stream flow at stream node ID = 1
...     print(model.get_stream_flow_at_location(1))
...
...     # print the results to the user-specified output files
...     model.print_results()
...
...     # advance the state of the hydrologic system in time
...     model.advance_state()
.
.
.
75741791.53232515
*   TIME STEP 2 AT 10/02/1990_24:00
75741791.53232515
*   TIME STEP 3 AT 10/03/1990_24:00
75741791.53232515
*   TIME STEP 4 AT 10/04/1990_24:00
75741791.53232515
.
.
.
*   TIME STEP 3652 AT 09/29/2000_24:00
85301157.65510693
*   TIME STEP 3653 AT 09/30/2000_24:00
85301292.67626143
>>> model.kill()
>>> model.close_log_file()