Core hierarchy

The core API is built on top of iris package.

class aeolus.core.Run(files=None, name='', description='', planet='', const_dir=None, model=<class 'aeolus.model.base.Model'>(53 fields), model_type=None, timestep=None, parent=None, children=None, processed=False)[source]

Bases: object

A single model ‘run’, i.e. simulation.

name

The run’s name.

Type

str

description

A description of the run.

Type

str

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='', description='', planet='', const_dir=None, model=<class 'aeolus.model.base.Model'>(53 fields), model_type=None, timestep=None, parent=None, children=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.

  • description (str, optional) – A description of the model. This is not used internally by aeolus; it is solely for the user’s information.

  • 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.

load_data(files)[source]

Load cubes.

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_netcdf(path)[source]

Save proc cubelist to a netCDF file with appropriate metadata.

Parameters

path (str or pathlib.Path) – File path.