arlmet.GridWindow#

class arlmet.GridWindow(x_start, x_stop, y_start, y_stop)[source]#

Rectangular subset of a grid using zero-based half-open indices.

Parameters:
  • x_start (int) – Inclusive start and exclusive stop indices in the x direction. On a lat/lon grid that spans 360 degrees (Grid.wraps_lon), x_stop may pass the grid’s nx: the window then runs on from the last column to the first, as a crop across the grid’s seam does.

  • x_stop (int) – Inclusive start and exclusive stop indices in the x direction. On a lat/lon grid that spans 360 degrees (Grid.wraps_lon), x_stop may pass the grid’s nx: the window then runs on from the last column to the first, as a crop across the grid’s seam does.

  • y_start (int) – Inclusive start and exclusive stop indices in the y direction.

  • y_stop (int) – Inclusive start and exclusive stop indices in the y direction.

Attributes

nx

Number of selected x-grid points.

ny

Number of selected y-grid points.

shape

Window shape as (ny, nx).

x_slice

Slice object for selecting the x range.

y_slice

Slice object for selecting the y range.