hydromt.model.processes.mesh.create_mesh2d_from_mesh#

hydromt.model.processes.mesh.create_mesh2d_from_mesh(uds: UgridDataset, *, grid_name: str | None, crs: int | None, bounds: Tuple[float, float, float, float] | None = None) UgridDataset[source]#

Create a 2D mesh from another mesh.

The 2D mesh can be extracted from a multi grid mesh using the grid_name argument. If bounds are provided, the mesh is clipped to the bounds.

Parameters:
  • uds (xu.UgridDataset) – Mesh dataset.

  • grid_name (str, optional) – Name of the grid to extract from the mesh.

  • crs (int, optional) – Optional EPSG code of the mesh if cannot be found.

  • bounds (tuple, optional) – Bounding box to clip the mesh.

  • logger (logging.Logger) – Logger object, a default module logger is used if not specified.

Returns:

mesh2d – Generated mesh2d.

Return type:

xu.UgridDataset