improver.utilities.load module
Module for loading cubes.
- load_cube(filepath, constraints=None, no_lazy_load=False)[source]
Load the filepath provided using Iris into a cube. Strips off all var names except for “threshold”-type coordinates, where this is different from the standard or long name.
- Parameters:
filepath (
Union
[str
,List
[str
]]) – Filepath that will be loaded or list of filepaths that can be merged into a single cube.constraints (
Union
[Constraint
,str
,None
]) – Constraint to be applied when loading from the input filepath. This can be in the form of an iris.Constraint or could be a string that is intended to match the name of the cube. The default is None.no_lazy_load (
bool
) – If True, bypass cube deferred (lazy) loading and load the whole cube into memory. This can increase performance at the cost of memory. If False (default) then lazy load.
- Return type:
- Returns:
Cube that has been loaded from the input filepath given the constraints provided.
- load_cubelist(filepath, constraints=None, no_lazy_load=False)[source]
Load cubes from filepath(s) into a cubelist. Strips off all var names except for “threshold”-type coordinates, where this is different from the standard or long name.
- Parameters:
filepath (
Union
[str
,List
[str
]]) – Filepath(s) that will be loaded.constraints (
Union
[Constraint
,str
,None
]) – Constraint to be applied when loading from the input filepath. This can be in the form of an iris.Constraint or could be a string that is intended to match the name of the cube. The default is None.no_lazy_load (
bool
) – If True, bypass cube deferred (lazy) loading and load the whole cube into memory. This can increase performance at the cost of memory. If False (default) then lazy load.
- Return type:
- Returns:
CubeList that has been created from the input filepath given the constraints provided.