imod.util.empty_3d#
- imod.util.empty_3d(dx: Union[float, ndarray], xmin: float, xmax: float, dy: Union[float, ndarray], ymin: float, ymax: float, layer: Union[int, Sequence[int], ndarray]) DataArray [source]#
Create an empty 2D (x, y) DataArray.
dx
anddy
may be provided as:scalar: for equidistant spacing
array: for non-equidistant spacing
Note that xarray (and netCDF4) uses midpoint coordinates.
xmin
andxmax
are used to generate the appropriate midpoints.- Parameters:
dx (float, 1d array of floats) – cell size along x
xmin (float) –
xmax (float) –
dy (float, 1d array of floats) – cell size along y
ymin (float) –
ymax (float) –
layer (int, sequence of integers, 1d array of integers) –
- Returns:
empty – Filled with NaN.
- Return type:
xr.DataArray