imod.util.mdal_compliant_ugrid2d#

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

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

  • Breaks down variables with a layer dimension into separate variables.

  • Removes absent entries from the mesh topology attributes.

  • Sets encoding to float for datetime variables.

  • Convert face_node_connectivity to float and set _FillValue to NaN (xarray).