xugrid.Ugrid2d.to_periodic#

Ugrid2d.to_periodic(obj=None)[source]#

Convert this grid to a periodic grid, where the rightmost nodes are equal to the leftmost nodes. Note: for this to work, the y-coordinates on the left boundary must match those on the right boundary exactly.

Returns:

  • periodic_grid (Ugrid2d)

  • aligned (xr.DataArray or xr.Dataset)