arlmet.VerticalAxis#

class arlmet.VerticalAxis(levels, *, offset=0.0)[source]#

Abstract base class for ARL vertical coordinate axes.

Use from_flag() to construct from a raw ARL flag integer, or instantiate a subclass directly (e.g. PressureAxis(levels=[...])).

Vertical axes are immutable value objects: levels is a read-only NumPy array, attributes cannot be reassigned, and equal axes hash equally. Build a new axis to change one.

Parameters:
  • levels (array-like of float) – Native level values stored in the file (1-D).

  • offset (float, default 0.0) – Pressure offset used by sigma and hybrid coordinate conversions.

flag#

ARL vertical coordinate flag (1=sigma, 2=pressure, 3=terrain, 4=hybrid).

Type:

int

coord_system#

Human-readable coordinate system name.

Type:

str

levels#

Read-only float64 array of native level values.

Type:

numpy.ndarray

offset#

Pressure offset stored in the index record.

Type:

float

Methods

VerticalAxis.__init__(levels, *[, offset])

VerticalAxis.from_flag(flag, levels, *[, offset])

Construct the appropriate subclass from an ARL vertical flag.

VerticalAxis.to_height_agl(*[, ...])

Compute height above ground level [m] at each level.

VerticalAxis.to_pressure(*[, surface_pressure])

Compute pressure [hPa] at each level.

Attributes