lair.geo.generate_regular_grid#

lair.geo.generate_regular_grid(xmin, xmax, dx, ymin, ymax, dy, x_label='x', y_label='y', chunks=None)[source]#

Generate a regular grid. Grid points are cell centers.

Parameters:
  • xmin (float) – x value of the left edge of the grid

  • xmax (float) – x value of the right edge of the grid

  • dx (float) – x resolution

  • ymin (float) – y value of the bottom edge of the grid

  • ymax (float) – y value of the top edge of the grid

  • dy (float) – y resolution

  • x_label (str, optional) – Name of the x coordinate, by default ‘x’

  • y_label (str, optional) – Name of the y coordinate, by default ‘y’

  • chunks (dict | None)

Returns:

xr.DataArray – The generated grid

Return type:

DataArray