Regions

class aeolus.region.Region(west_bound, east_bound, south_bound, north_bound, name='', description='', model=<class 'aeolus.model.base.Model'>(53 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=<class 'aeolus.model.base.Model'>(53 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=<class 'aeolus.model.base.Model'>(53 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) – Use margin number of points or degrees to create 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.

Returns

Return type

aeolus.region.Region

property constraint

Constraint to select data within the region.

add_to_ax(ax, **kwargs)[source]

Add a Rectangle patch to matplotlib axes ax with given keyword arguments kwargs.