imod.util.to_ugrid2d#
- imod.util.to_ugrid2d(data: DataArray | Dataset) Dataset [source]#
Convert a structured DataArray or Dataset into its UGRID-2D quadrilateral equivalent.
- Parameters:
data (Union[xr.DataArray, xr.Dataset]) – Dataset or DataArray with last two dimensions (“y”, “x”). In case of a Dataset, the 2D topology is defined once and variables are added one by one. In case of a DataArray, a name is required; a name can be set with:
da.name = "..."
’- Returns:
ugrid2d_dataset – The equivalent data, in UGRID-2D quadrilateral form.
- Return type:
xr.Dataset