Physical constants — aeolus 0.4.9+9.g5a71939.dirty documentation

# Physical constants

aeolus.const.init_const(name='general', directory=None)

  Create a dataclass with a given set of constants.

  Parameters

    - name (str, optional) – Name of the constants set. Should be identical to the JSON file name (without the .json extension). If not given, only general physical constants are returned.

    - directory (pathlib.Path, optional) – Path to a folder with JSON files containing constants for a specific planet.

  Returns

  Return type

    Dataclass with constants as iris cubes.

  Examples

      >>> c = init_const('earth')
      >>> c
      EarthConstants(gravity [m s-2], radius [m], day [s], solar_constant [W m-2], ...)
      >>> c.gravity
      <iris 'Cube' of gravity / (m s-2) (scalar cube)>

class aeolus.const.const.ConstContainer

  Bases: `object`

  Base class for creating dataclasses and storing planetary constants.

class aeolus.const.const.ScalarCube(*args, **kw)

  Bases: `iris.cube.Cube`

  Cube without coordinates.

  __init__(*args, **kw)

    Initialise aeolus.const.const.ScalarCube.

  property asc

    Convert cube to AuxCoord for math ops.

  classmethod from_cube(cube)

    Convert iris cube to ScalarCube.