Subset cubes using constraints — aeolus 0.4.9+9.g5a71939.dirty documentation

# Subset cubes using constraints

class aeolus.subset.DimConstr(model=<class 'aeolus.model.base.Model'>(80 fields))

  Bases: `object`

  Container for strict or relaxed dimensional constraints.

  Examples

  Extract cubes that have y and x dimensional coordinates (among others):

      >>> dc = DimConstr()
      >>> cubelist.extract(dc.relax.yx)

  Extract cubes that only have model levels, y and x dimensions:

      >>> dc = DimConstr()
      >>> cubelist.extract(dc.strict.myx)

  __init__(model=<class 'aeolus.model.base.Model'>(80 fields))

    Initialise DimConstr.

    Parameters

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

aeolus.subset.extract_last_month(cube, model=<class 'aeolus.model.base.Model'>(80 fields))

  Extract time slices within the last months of a cube.

aeolus.subset.extract_last_n_days(cube, days=365, model=<class 'aeolus.model.base.Model'>(80 fields))

  Extract time slices within the last n days of its time dimension.

aeolus.subset.l_range_constr(h_min, h_max, units='km', coord='level_height')

  Make a constraint on length range.

aeolus.subset.unique_cubes(cubelist)

  Remove duplicate cubes from iris.cube.CubeList.