imod.mf6.ApiPackage.to_netcdf#
- ApiPackage.to_netcdf(*args, mdal_compliant: bool = False, crs: Any | None = None, **kwargs) None#
- Write dataset contents to a netCDF file. Custom encoding rules can be provided on package level by overriding the _netcdf_encoding in the package - Parameters:
- *args – Will be passed on to - xr.Dataset.to_netcdfor- xu.UgridDataset.to_netcdf.
- mdal_compliant (bool, optional) – Convert data with - imod.prepare.spatial.mdal_compliant_ugrid2d()to MDAL compliant unstructured grids. Defaults to False.
- crs (Any, optional) – Anything accepted by rasterio.crs.CRS.from_user_input Requires - rioxarrayinstalled.
- **kwargs – Will be passed on to - xr.Dataset.to_netcdfor- xu.UgridDataset.to_netcdf.