flopy.mf6.utils.lakpak_utils module

get_lak_connections(modelgrid, lake_map, idomain=None, bedleak=None)[source]

Function to create lake package connection data from a zero-based integer array of lake numbers. If the shape of lake number array is equal to (nrow, ncol) or (ncpl) then the lakes are on top of the model and are vertically connected to cells at the top of the model. Otherwise the lakes are embedded in the grid.

TODO: implement embedded lakes for VertexGrid

TODO: add support for UnstructuredGrid

Parameters:
  • modelgrid (StructuredGrid, VertexGrid) – model grid

  • lake_map (MaskedArray, ndarray, list, tuple) – location and zero-based lake number for lakes in the model domain. If lake_map is of size (nrow, ncol) or (ncpl) lakes are located on top of the model and vertically connected to cells in model layer 1. If lake_map is of size (nlay, nrow, ncol) or (nlay, ncpl) lakes are embedded in the model domain and horizontal and vertical lake connections are defined.

  • idomain (int or ndarray) – location of inactive cells, which are defined with a zero value. If a ndarray is passed it must be of size (nlay, nrow, ncol) or (nlay, ncpl).

  • bedleak (ndarray, list, tuple, float) – bed leakance for lakes in the model domain. If bedleak is a float the same bed leakance is applied to each lake connection in the model. If bedleak is of size (nrow, ncol) or (ncpl) then all lake connections for the cellid are given the same bed leakance value. If bedleak is None, lake conductance is only a function of aquifer properties for all lakes. Can also pass mixed values as list or ndarray of size (nrow, ncol) or (ncpl) with floats and ‘none’ strings.

Returns:

  • idomain (ndarry) – idomain adjusted to inactivate cells with lakes

  • connection_dict (dict) – dictionary with the zero-based lake number keys and number of connections in a lake values

  • connectiondata (list of lists) – connectiondata block for the lake package