pywfm.IWFMModel.get_stream_inflows_at_some_locations#

IWFMModel.get_stream_inflows_at_some_locations(stream_inflow_locations='all', inflow_conversion_factor=1.0)#

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

Parameters:
  • stream_inflow_locations (int, list, tuple, np.ndarray, or str='all', default='all') – one or more stream inflow ids used to return flows

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

Returns:

array of inflows for the inflow locations at the current simulation time step

Return type:

np.ndarray

Note

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

See also

IWFMModel.get_stream_flow_at_location

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

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 inflows
...     print(model.get_stream_inflows_at_some_locations(1)[0])
...
...     # print the results to the user-specified output files
...     model.print_results()
...
...     # advance the state of the hydrologic system in time
...     model.advance_state()
.
.
.
86400000.
*   TIME STEP 2 AT 10/02/1990_24:00
86400000.
*   TIME STEP 3 AT 10/03/1990_24:00
86400000.
*   TIME STEP 4 AT 10/04/1990_24:00
86400000.
.
.
.
*   TIME STEP 3652 AT 09/29/2000_24:00
86400000.
*   TIME STEP 3653 AT 09/30/2000_24:00
86400000.
>>> model.kill()
>>> model.close_log_file()