arlmet.SigmaAxis#
- class arlmet.SigmaAxis(levels, *, offset=0.0)[source]#
Bases:
VerticalAxisFlag=1. Sigma coordinate — heights via hypsometric integration.
The stored levels are sigma, with level 0 the surface.
to_pressuregives the nominal pressureoffset + (surface_pressure - offset) * sigma. A file with aPRESfield (HRRR, WRF converted byarw2arl) holds each level’s real pressure there, which can differ from the nominal one by tens of hPa aloft; HYSPLIT’sprfsigthen usesPRES, and so doarlmet.sample_points(),arlmet.pressure()andarlmet.z_agl(). Pass it toto_height_aglaspressure.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
|
Height AGL [m] by hypsometric integration from |
|
Nominal pressure [hPa] from |
Inherited
From VerticalAxis: from_flag