pywfm.IWFMModel.get_elements_in_lake#

IWFMModel.get_elements_in_lake(lake_id)#

Return the element ids with the specified lake ID

Parameters:

lake_id (int) – lake ID used to obtain element IDs that correspond to the lake

Returns:

array of element IDs representing the lake with the provided ID number

Return type:

np.ndarray

See also

IWFMModel.get_n_lakes

Return the number of lakes in an IWFM model

IWFMModel.get_lake_ids

Return an array of the lake IDs in an IWFM model

IWFMModel.get_n_elements_in_lake

Return the number of finite element grid cells that make up a lake

Example

>>> from pywfm import IWFMModel
>>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN'
>>> sim_file = 'Simulation_MAIN.IN'
>>> model = IWFMModel(pp_file, sim_file)
>>> model.get_elements_in_lake(1)
array([169, 170, 171, 188, 189, 190, 207, 208, 209, 210])
>>> model.kill()
>>> model.close_log_file()