imod.util.mdal_compliant_ugrid2d#

imod.util.mdal_compliant_ugrid2d(dataset: Dataset) Dataset[source]#

Ensures the xarray Dataset will be written to a UGRID netCDF that will be accepted by MDAL.

  • Unstacks variables with a layer dimension into separate variables.

  • Removes absent entries from the mesh topology attributes.

  • Sets encoding to float for datetime variables.

Parameters:

dataset (xarray.Dataset) –

Returns:

unstacked

Return type:

xr.Dataset