hydromt.model.components.MeshComponent.write#

MeshComponent.write(filename: str | None = None, *, write_optional_ugrid_attributes: bool = False, **kwargs) None[source]#

Write model grid data to a netCDF file at <root>/<filename>.

Keyword arguments are passed to xarray.Dataset.to_netcdf().

Parameters:
  • filename (str, optional) – Filename relative to the model root directory, by default ‘grid/grid.nc’.

  • write_optional_ugrid_attributes (bool, optional) – If True, write optional ugrid attributes to the netCDF file, by default True.

  • **kwargs (dict) – Additional keyword arguments to be passed to the xarray.Dataset.to_netcdf method.