Core hierarchy¶
Core classes to store and process model output.
- class aeolus.core.AtmoSim(cubes=None, name='', description='', planet='', const_dir=None, model=<class 'aeolus.model.base.Model'>(80 fields), model_type=None, timestep=None, vert_coord=None)[source]¶
Bases:
aeolus.core.AtmoSimBaseMain class for dealing with a atmospheric model simulation output in aeolus.
Used to store and calculate atmospheric fields from gridded model output. Derived quantities are stored as cached properties to save computational time.
- sigma_p¶
Calculate the wind speed (magnitude of the wind vector).
- Parameters
args (iris.cube.Cube) – Cubes of u, v, w wind components.
math:: (.) – sqrt{u^2 + v^2 + w^2}
- wind_speed¶
Calculate the wind speed (magnitude of the wind vector).
- Parameters
args (iris.cube.Cube) – Cubes of u, v, w wind components.
math:: (.) – sqrt{u^2 + v^2 + w^2}
- toa_net_energy¶
Calculate domain-average TOA energy flux.
- Parameters
cubelist (iris.cube.CubeList) – Input list of cubes.
model (aeolus.model.Model, optional) – Model class with relevant variable names.
- Returns
Cube of total TOA downward energy flux.
- Return type
- sfc_water_balance¶
Calculate domain-average precipitation minus evaporation.
- Parameters
cubelist (iris.cube.CubeList) – Input list of cubes.
const (aeolus.const.const.ConstContainer, optional) – Must have a scalar cube of condensible_density as an attribute. If not given, attempt is made to retrieve it from cube attributes.
model (aeolus.model.Model, optional) – Model class with relevant variable names.
- Returns
Cube of total surface downward water flux (P-E).
- Return type
- class aeolus.core.Run(files=None, name='', planet='', const_dir=None, model=<class 'aeolus.model.base.Model'>(80 fields), model_type=None, timestep=None, processed=False)[source]¶
Bases:
objectA single model ‘run’, i.e. simulation.
- const¶
Physical constants used in calculations for this run.
- Type
aeolus.const.ConstContainer
- model¶
Model class with relevant coordinate names.
- Type
aeolus.model.Model, optional
- __init__(files=None, name='', planet='', const_dir=None, model=<class 'aeolus.model.base.Model'>(80 fields), model_type=None, timestep=None, processed=False)[source]¶
Instantiate a Run object.
- Parameters
files (str or pathlib.Path, optional) – Wildcard for loading files.
name (str, optional) – The run’s name.
planet (str, optional) – Planet configuration. This is used to get appropriate physical constants. If not given, Earth physical constants are initialised.
const_dir (pathlib.Path, optional) – Path to a folder with JSON files containing constants for a specific planet.
model (aeolus.model.Model, optional) – Model class with relevant coordinate and variable names.
model_type (str, optional) – Type of the model run, global or LAM.
timestep (int, optional) – Model time step in s.
parent (aeolus.core.Run, optional) – Pointer to this run’s driving model if this is a LAM-type simulation.
children (list, optional) – List of aeolus.core.Run objects if this is a driving model.
processed (bool, optional) – If True, data from files is assigned to proc attribute.
See also
- proc_data(func=None, **func_args)[source]¶
Post-process data for easier analysis and store it in self.proc attribute.
- Parameters
func (callable) – Function that takes iris.cube.CubeList as its first argument.
**func_args (dict-like, optional) – Keyword arguments passed to func.
- add_data(func=None, **func_args)[source]¶
Calculate additional diagnostics (of type iris.cube.Cube) and add them to self.proc.
- Parameters
func (callable) – Function that takes iris.cube.CubeList (self.proc) as its first argument and appends new cubes to it (and does not return anything).
**func_args (dict-like, optional) – Keyword arguments passed to func.
- to_file(path)[source]¶
Save proc cubelist to a file with appropriate metadata.
- Parameters
path (str or pathlib.Path) – File path.