iwfm.calib.idw

iwfm.calib.idw(x, y, elem, nnodes, nlayers, nodexy, elevations, debug=0)[source]

Interpolate per-layer nodal values to the point (x, y) using inverse distance weighting over the nodes of the element containing the point.

Parameters:
  • x (float) – point X coordinate

  • y (float) – point Y coordinate

  • elem (int) – element containing the point (informational, used in log messages)

  • nnodes (list of ints) – node IDs of the element’s nodes; a 0 entry (triangle placeholder) is skipped along with its nodexy/elevations row

  • nlayers (int) – number of model layers

  • nodexy (list) – (x, y) coordinates of the element’s nodes, same order as nnodes

  • elevations (list) – per-node list of nlayers values (e.g. layer elevations), same order as nnodes

  • debug (int, default=0, optional) – >0 = log debug information

Returns:

interp_values – nlayers values interpolated to (x, y)

Return type:

list