Cube functions for coordinate categorisation.
In this module:
Add a new coordinate to a cube, by categorising an existing one.
Make a new iris.coords.AuxCoord from mapped values, and add it to the cube.
Args:
the cube containing ‘from_coord’. The new coord will be added into it.
name of the created coordinate
coordinate in ‘cube’, or the name of one
function(coordinate, value), returning a category value for a coordinate point-value
Kwargs:
units of the category value, typically ‘no_unit’ or ‘1’.
Add a categorical day-of-month coordinate, values 1..31.
Add a categorical day-of-year coordinate, values 1..365 (1..366 in leap years).
Add a categorical month coordinate, values ‘Jan’..’Dec’.
Add a categorical month coordinate, values ‘January’..’December’.
Add a categorical month coordinate, values 1..12.
Add a categorical season-of-year coordinate, with user specified seasons.
Args:
The cube containing ‘coord’. The new coord will be added into it.
Coordinate in ‘cube’, or its name, representing time.
Kwargs:
Name of the created coordinate. Defaults to “season”.
List of seasons defined by month abbreviations. Each month must appear once and only once. Defaults to standard meteorological seasons (‘djf’, ‘mam’, ‘jja’, ‘son’).
Add a categorical season membership coordinate for a user specified season.
The coordinate has the value True for every time that is within the given season, and the value False otherwise.
Args:
The cube containing ‘coord’. The new coord will be added into it.
Coordinate in ‘cube’, or its name, representing time.
Season defined by month abbreviations.
Kwargs:
Name of the created coordinate. Defaults to “season_membership”.
Add a categorical season-of-year coordinate, values 0..N-1 where N is the number of user specified seasons.
Args:
The cube containing ‘coord’. The new coord will be added into it.
Coordinate in ‘cube’, or its name, representing time.
Kwargs:
Name of the created coordinate. Defaults to “season_number”.
List of seasons defined by month abbreviations. Each month must appear once and only once. Defaults to standard meteorological seasons (‘djf’, ‘mam’, ‘jja’, ‘son’).
Add a categorical year-of-season coordinate, with user specified seasons.
Args:
The cube containing ‘coord’. The new coord will be added into it.
Coordinate in ‘cube’, or its name, representing time.
Kwargs:
Name of the created coordinate. Defaults to “season_year”.
List of seasons defined by month abbreviations. Each month must appear once and only once. Defaults to standard meteorological seasons (‘djf’, ‘mam’, ‘jja’, ‘son’).
Add a categorical weekday coordinate, values ‘Mon’..’Sun’.
Add a categorical weekday coordinate, values ‘Monday’..’Sunday’.
Add a categorical weekday coordinate, values 0..6 [0=Monday].
Add a categorical calendar-year coordinate.