xugrid.Ugrid2d.from_structured_multicoord#

static Ugrid2d.from_structured_multicoord(data: DataArray | Dataset, x: str, y: str) Ugrid2d[source]#

Create a Ugrid2d topology from a structured topology, including rotated and (approximated) curvilinear topologies.

This method assumes the coordinates are 2D.

Use from_structured for 1D x and y coordinates, which is generally the case for axis-aligned rectilinear topologies (most rasters).

Parameters:
  • data (xr.DataArray or xr.Dataset) –

  • x (str) – Name of the 2D coordinate to use as the UGRID x-coordinate.

  • y (str) – Name of the 2D coordinate to use as the UGRID y-coordinate.

Returns:

grid

Return type:

Ugrid2d