pywfm.IWFMModel.get_element_pump_purpose#

IWFMModel.get_element_pump_purpose(element_pumps='all')#

Return the flags for the initial purpose of the element pumping as ag, urban, or both

Parameters:

element_pumps (int, list, tuple, np.ndarray, or str='all', default='all') – One or more element pump identification numbers used to return the supply purpose.

Returns:

array of flags for each supply index provided

Return type:

np.ndarray

Note

This method is intended to be used during a model simulation (is_for_inquiry=0) after the timeseries data are read If it is used when is_for_inquiry=1, it will return the urban flag for each diversion regardless if it is urban, ag, or both

flag equal to 1 for urban water demands flag equal to 10 for agricultural water demand flag equal to 11 for both ag and urban

automatic supply adjustment in IWFM allows the supply purpose to change dynamically, so this only returns the user-specified initial value.

See also

IWFMModel.get_diversion_purpose

Return the flags for the initial purpose of the diversions as ag, urban, or both

IWFMModel.get_well_pumping_purpose

Return the flags for the initial purpose of the well pumping as ag, urban, or both

Examples

>>> from pywfm import IWFMModel
>>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN'
>>> sim_file = 'Simulation_MAIN.IN'
>>> model = IWFMModel(dll, 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()
...
...     # get well pumping supply purpose
...     print(model.get_element_pumping_purpose())
...
...     # Simulate the hydrologic process for the timestep
...     model.simulate_for_one_timestep()
...
...     # print the results to the user-specified output files
...     model.print_results()
...
...     # advance the state of the hydrologic system in time
...     model.advance_state()
.
.
.
>>> model.kill()
>>> model.close_log_file()
>>> from pywfm import IWFMModel
>>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN'
>>> sim_file = 'Simulation_MAIN.IN'
>>> model = IWFMModel(pp_file, sim_file)
>>> model.get_element_pumping_purpose()
>>> model.kill()
>>> model.close_log_file()