Prepare model input#

Regridder(method[, ndim_regrid, ...])

Object to repeatedly regrid similar objects.

LayerRegridder(method)

Object to repeatedly regrid layers of similar objects.

Voxelizer(method[, use_relative_weights])

Object to repeatedly voxelize similar objects.

fill(da[, dims])

Fill in NaNs using basic nearest neighbour interpolation.

laplace_interpolate(source[, ibound, close, ...])

Fills gaps in source by interpolating from existing values using Laplace interpolation.

polygonize(da)

Polygonize a 2D-DataArray into a GeoDataFrame of polygons.

reproject(source[, like, src_crs, dst_crs, ...])

Reprojects and/or resamples a 2D xarray DataArray to a different cellsize or coordinate system.

rasterize(geodataframe, like[, column, ...])

Rasterize a geopandas GeoDataFrame onto the given xarray coordinates.

gdal_rasterize(path, column[, like, nodata, ...])

Use GDAL to rasterize a vector file into an xarray.DataArray.

celltable(path, column, resolution, like[, ...])

Process area of features by rasterizing in a chunkwise manner to limit memory usage.

rasterize_celltable(table, column, like)

Rasterizes a table, such as produced by imod.prepare.spatial.celltable.

zonal_aggregate_polygons(path_a, path_b, ...)

Compute a zonal aggregate of polygon data for (other) polygon geometries, e.g. a mean, mode, or percentile.

zonal_aggregate_raster(path, column, raster, ...)

Compute a zonal aggregate of raster data for polygon geometries, e.g. a mean, mode, or percentile.

linestring_to_square_zpolygons(barrier_x, ...)

Create square vertical polygons from linestrings, with a varying ztop and zbottom over the line. Note: If the lists of x and y values of length N, the list of z values need to have length N-1. These are shaped as follows::.

linestring_to_trapezoid_zpolygons(barrier_x, ...)

Create trapezoid vertical polygons from linestrings, with a varying ztop and zbottom over the line. These are shaped as follows::.

assign_wells(wells, top, bottom[, k, ...])

Distribute well pumping rate according to filter length when k=None, or to transmissivity of the sediments surrounding the filter.

get_lower_active_grid_cells(active)

Returns grid of booleans designating location of the lowermost active grid cell.

get_lower_active_layer_number(active)

Returns two-dimensional grid of integers with the layer number of the lower most active cell.

get_upper_active_grid_cells(active)

Returns grid of booleans designating location of the uppermost active grid cell.

get_upper_active_layer_number(active)

Returns planar grid of integers with the layer number of the upper most active cell.

create_layered_top(bottom, top)

Create a top array with a layer dimension, from a top array with no layer dimension and a bottom array with a layer dimension.

ALLOCATION_OPTION(value[, names, module, ...])

Enumerator for settings to allocate planar grid with RIV, DRN, GHB, or RCH cells over the vertical layer dimensions.

DISTRIBUTING_OPTION(value[, names, module, ...])

Enumerator containing settings to distribute 2D conductance grids over vertical layers for the RIV, DRN or GHB package.

allocate_drn_cells(allocation_option, ...)

Allocate drain cells from a planar grid across the vertical dimension.

allocate_ghb_cells(allocation_option, ...)

Allocate general head boundary (GHB) cells from a planar grid across the vertical dimension.

allocate_rch_cells(allocation_option, ...)

Allocate recharge cells from a planar grid across the vertical dimension.

allocate_riv_cells(allocation_option, ...)

Allocate river cells from a planar grid across the vertical dimension.

c_leakage(kh, kv, D, c0, c1, B, length, dx, dy)

Computes the phreatic leakage resistance.

c_radial(L, kh, kv, B, D)

Ernst's radial resistance term to a drain.

distribute_drn_conductance(...)

Function to distribute 2D conductance over vertical layers for the DRN package.

distribute_ghb_conductance(...)

distribute_riv_conductance(...)

Function to distribute 2D conductance over vertical layers for the RIV package.

cleanup_drn(idomain, elevation, conductance)

Clean up drain data, fixes some common mistakes causing ValidationErrors by doing the following:

cleanup_ghb(idomain, head, conductance[, ...])

Clean up general head boundary data, fixes some common mistakes causing ValidationErrors by doing the following:

cleanup_riv(idomain, bottom, stage, ...[, ...])

Clean up river data, fixes some common mistakes causing ValidationErrors by doing the following:

cleanup_wel(wells, top, bottom[, ...])

Clean up dataframe with wells, fixes some common mistakes in the following order: