Core hierarchy

Core submodule of aeolus package.

class aeolus.core.AtmoSim(cubes=None, name='', description='', planet='', const_dir=None, model=Model [99 fields], model_type=None, timestep=None, vert_coord=None, coord_check=False)[source]

Bases: AtmoSimBase

Main class for dealing with a atmospheric model simulation output.

Used to store and calculate atmospheric fields from gridded model output. Derived quantities are stored as cached properties to save time.

sigma_p

Calculate sigma (normalised pressure coordinate) from a cube of pressure.

\[\sigma = p / p_{sfc}\]
Parameters:
  • cubelist (iris.cube.CubeList) – Input list of cubes.

  • model (aeolus.model.Model, optional) – Model class with relevant variable names.

wind_speed

Calculate the wind speed (magnitude of the wind vector).

\[\sqrt{u^2 + v^2 + w^2}\]
Parameters:

args (iris.cube.Cube) – Cubes of u, v, w wind components.

Return type:

iris.cube.Cube

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:

iris.cube.Cube

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:

iris.cube.Cube

class aeolus.core.AtmoSimBase(cubes=None, name='', description='', planet='', const_dir=None, model=Model [99 fields], model_type=None, timestep=None, vert_coord=None, coord_check=False)[source]

Bases: object

Base class for creating atmospheric model simulation classes in aeolus.

Used to store and calculate atmospheric fields from gridded model output. Derived quantities are stored as cached properties to save time.

Assumes the data are in spherical coordinates on a regular lat-lon grid.

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 and variable names.

Type:

aeolus.model.Model, optional

__init__(cubes=None, name='', description='', planet='', const_dir=None, model=Model [99 fields], model_type=None, timestep=None, vert_coord=None, coord_check=False)[source]

Instantiate an AtmoSimBase object.

Parameters:
  • cubes (iris.cube.CubeList) – Atmospheric fields.

  • name (str, optional) – The name or label of this AtmoSim.

  • description (str, optional) – This is not used internally; solely for the user’s information.

  • planet (str, optional) – Planet configuration used to get appropriate physical constants. If not given, Earth physical constants are initialised.

  • const_dir (pathlib.Path, optional) – Path to a folder with files with 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.

  • vert_coord (str, optional) – Character identificator for the model’s vertical coordinate. “z” - data on “level_height” “p” - data on pressure levels

  • coord_check (bool, optional) – Check if all cubes have the same set of coordinates.

classmethod from_parent_class(obj)[source]

Dynamically inherit from a similar class.

extract(constraints)[source]

Subset AtmoSim using iris constraints.

Parameters:

constraints (iris.Constraint or iterable of constraints) – A single constraint or an iterable.