earthkit.meteo.vertical.array.pressure_at_model_levels

earthkit.meteo.vertical.array.pressure_at_model_levels(A, B, sp, alpha_top='ifs')

Compute pressure at model full- and half-levels.

Deprecated in version 1.0.0 See pressure_at_model_levels() is deprecated for details.

Parameters:
  • A (ndarray) – A-coefficients defining the model levels. See [IFS-CY49R1-Dynamics] Chapter 2, Section 2.2.1. for details.

  • B (ndarray) – B-coefficients defining the model levels. See [IFS-CY49R1-Dynamics] Chapter 2, Section 2.2.1. for details.

  • sp (number or ndarray) – Surface pressure (Pa)

  • alpha_top (str, optional) –

    Option to initialise alpha on the top of the model atmosphere (first half-level in vertical coordinate system). The possible values are:

    • ”ifs”: alpha is set to log(2). See [IFS-CY49R1-Dynamics] (page 7) for details.

    • ”arpege”: alpha is set to 1.0

Returns:

  • ndarray – Pressure at model full-levels

  • ndarray – Pressure at model half-levels

  • ndarray – Delta at full-levels

  • ndarray – Alpha at full-levels

Return type:

tuple[numpy.typing.NDArray[Any], numpy.typing.NDArray[Any], numpy.typing.NDArray[Any], numpy.typing.NDArray[Any]]

Notes

A and B must contain the same model half-levels in ascending order with respect to the model level number. The model level range must be contiguous and must include the bottom-most model half-level (surface), but not all the levels must be present. E.g. if the vertical coordinate system has 137 model levels using only a subset of levels between e.g. 137-96 is allowed.

For details on the returned parameters see [IFS-CY49R1-Dynamics] Chapter 2, Section 2.2.1.

The pressure on the model-levels is calculated as:

\[ \begin{align}\begin{aligned}p_{k+1/2} = A_{k+1/2} + p_{s} B_{k+1/2}\\p_{k} = \frac{1}{2} (p_{k-1/2} + p_{k+1/2})\end{aligned}\end{align} \]

where

  • \(p_{s}\) is the surface pressure

  • \(p_{k+1/2}\) is the pressure at the half-levels

  • \(p_{k}\) is the pressure at the full-levels

  • \(A_{k+1/2}\) and \(B_{k+1/2}\) are the A- and B-coefficients defining the model levels.