imod.prepare.laplace_interpolate#
- imod.prepare.laplace_interpolate(source: DataArray, dims: tuple[str, ...] = ('y', 'x'), direct: bool = False, delta: float = 0.0, relax: float = 0.97, atol: float = 0.0, rtol: float = 1e-05, maxiter: int = 500)[source]#
- Fills gaps in - source(NaN values) by interpolating from existing values using Laplace interpolation.- Parameters:
- source (xr.DataArray of floats) – Data values to interpolate. 
- dims (sequence of str, default is - ("y", "x").) – Dimensions along which to search for nearest neighbors. For example, (“y”, “x”) will perform 2D interpolation in the horizontal plane, while (“layer”, “y”, “x”) will perform 3D interpolation including the vertical dimension.
- direct (bool, optional, default - False) – Whether to use a direct or an iterative solver or a conjugate gradient solver. Direct method provides an exact answer, but are unsuitable for large problems (> 10 000 unknowns).
- delta (float, default 0.0.) – ILU0 preconditioner non-diagonally dominant correction. 
- relax (float, default 0.97.) – Modified ILU0 preconditioner relaxation factor. 
- rtol (float, optional, default 1.0e-5.) – Convergence tolerance for - scipy.sparse.linalg.cg.
- atol (float, optional, default 0.0.) – Convergence tolerance for - scipy.sparse.linalg.cg.
- maxiter (int, default 500.) – Maximum number of iterations for - scipy.sparse.linalg.cg.
 
- Returns:
- interpolated – source, with interpolated values. 
- Return type:
- xr.DataArray