hydromt.model.components.MeshComponent.write#
- MeshComponent.write(filename: str | None = None, *, region_options: Dict[str, Any] | 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.region_options (
dict
, optional) – Options to pass to the write_region method. Can contain filename, to_wgs84, and anything that will be passed to GeoDataFrame.to_file. If filename is not provided, self.region_filename will be used.**kwargs (
dict
) – Additional keyword arguments to be passed to the xarray.Dataset.to_netcdf method.