xugrid.Ugrid2d.from_meshkernel#

classmethod Ugrid2d.from_meshkernel(mesh, name: str = 'mesh2d', projected: bool = True, crs: Any = None)[source]#

Create a 2D UGRID topology from a MeshKernel Mesh2d object.

Parameters:
  • mesh (MeshKernel.Mesh2d)

  • name (str) – Mesh name. Defaults to “mesh2d”.

  • projected (bool) – Whether node_x and node_y are longitude and latitude or projected x and y coordinates. Used to write the appropriate standard_name in the coordinate attributes.

  • crs (Any, optional) – Coordinate Reference System of the geometry objects. Can be anything accepted by pyproj.CRS.from_user_input(), such as an authority string (eg “EPSG:4326”) or a WKT string.

Returns:

grid

Return type:

Ugrid2d