xugrid.Ugrid2d.to_nonperiodic#

Ugrid2d.to_nonperiodic(xmax: float, obj=None)[source]#

Convert this grid from a periodic grid (where the rightmost boundary shares its nodes with the leftmost boundary) to an aperiodic grid, where the leftmost nodes are separate from the rightmost nodes.

Parameters:
  • xmax (float) – The x-value of the newly created rightmost boundary nodes.

  • obj (xr.DataArray or xr.Dataset)

Returns:

  • nonperiodic_grid (Ugrid2d)

  • aligned (xr.DataArray or xr.Dataset)