gordias.datahandling.split_cube#
- gordias.datahandling.split_cube(cube: Cube, split_by: str) CubeList#
Split a cube into multiple cubes.
If split_by is used, the cube will be split into multiple cubes. These cubes are then saved separately and the date in the output filename will be replaced with the date of the stored cube.
- Parameters:
cube (iris.cube.Cube) – The iris cube to be saved.
spit_by (str) – A string defining if the output should be split into multiple files. Valid options: month, season, year, and year[nr].
- Raises:
NotImplementedError – If the period in split_by string is not implemented. Valid periods are month, season and year.
NotImplementedError – If brackets are used on any other period than year.
- Returns:
iris.cube.CubeListobject with the extracted cubes.- Return type: