Regions

Subsetting variables over geographical regions.

class aeolus.region.Region(west_bound, east_bound, south_bound, north_bound, name='', description='', model=Model [99 fields])[source]

Bases: object

Rectangular geographical region.

name

The region’s name

Type:

str

description

A description of the region

Type:

str

constraint

A constraint object associated with the region

Type:

iris.Constraint

__init__(west_bound, east_bound, south_bound, north_bound, name='', description='', model=Model [99 fields])[source]

Instantiate a Region object.

Parameters:
  • west_bound (scalar, optional) – The western, eastern, southern, and northern boundaries, respectively, of the region.

  • east_bound (scalar, optional) – The western, eastern, southern, and northern boundaries, respectively, of the region.

  • south_bound (scalar, optional) – The western, eastern, southern, and northern boundaries, respectively, of the region.

  • north_bound (scalar, optional) – The western, eastern, southern, and northern boundaries, respectively, of the region.

  • name (str, optional) – The region’s name.

  • description (str, optional) – A description of the region.

  • model (aeolus.model.Model, optional) – Model class with a relevant coordinate names.

classmethod from_cube(cube, name=None, margin=None, margin_units='points', shift_lons=False, model=Model [99 fields])[source]

Create a Region from limits of longitude and latitude of the cube.

Parameters:
  • cube (iris.cube.Cube) – Source cube.

  • name (str, optional) – Name for the region. If not given, created automatically from cube’s name.

  • margin (scalar, optional) – Number of points or degrees for a region smaller than the cube.

  • margin_units (str, optional) – Units of margin. Can be “points” or “degrees”.

  • shift_lons (bool, optional) – Shift longitudes to -180…180.

  • model (aeolus.model.Model, optional) – Model class with a relevant coordinate names.

Return type:

aeolus.region.Region

add_to_ax(ax, **kwargs)[source]

Add a Rectangle patch to matplotlib axes.