arlmet.SigmaAxis#

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

Bases: VerticalAxis

Flag=1. Sigma coordinate — heights via hypsometric integration.

The stored levels are sigma, with level 0 the surface. to_pressure gives the nominal pressure offset + (surface_pressure - offset) * sigma. A file with a PRES field (HRRR, WRF converted by arw2arl) holds each level’s real pressure there, which can differ from the nominal one by tens of hPa aloft; HYSPLIT’s prfsig then uses PRES, and so do arlmet.sample_points(), arlmet.pressure() and arlmet.z_agl(). Pass it to to_height_agl as pressure.

Examples

>>> import numpy as np
>>> from arlmet import SigmaAxis
>>> axis = SigmaAxis(levels=[1.0, 0.99, 0.95])
>>> axis.to_pressure(surface_pressure=1000.0)
array([1000.,  990.,  950.])
>>> z = axis.to_height_agl(
...     surface_pressure=1000.0,
...     temperature=np.array([290.0, 288.0, 286.0]),
...     pressure=np.array([np.nan, 988.0, 945.0]),
... )
>>> np.round(z, 1)
array([  0. , 102.1, 475.9])

Attributes

Methods

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

Height AGL [m] by hypsometric integration from surface_pressure with temperature.

to_pressure(*[, surface_pressure])

Nominal pressure [hPa] from surface_pressure: offset + (sp - offset) * sigma.

Inherited

From VerticalAxis: from_flag