arlmet.pressure#

arlmet.pressure(ds)[source]#

Pressure (hPa) at each level.

Parameters:

ds (Dataset) – Dataset from arlmet.open_dataset().

Returns:

  • flag=2: the stored 1D pressure non-dim coord (level,).

  • flag=1 (sigma): the PRES data variable when the dataset has it, as HYSPLIT’s prfsig uses it; otherwise, as for flag 4, a spatially varying array (time, level, y, x) computed from surface pressure (PRSS) via sigma-to-pressure conversion.

  • flag=4 (hybrid): computed from PRSS and the stored levels; PRES is not used, as in HYSPLIT’s prfecm.

  • flag=3: returns the PRES data variable (3D pressure field in hPa) if present in the dataset. Terrain-following ARL files typically store this field. Raises ValueError if PRES is absent.

  • flag=5 (WRF): returns the PRES data variable, as HYSPLIT’s prfwrf does; WRF’s hybrid levels need coefficients the file does not store. Raises ValueError if PRES is absent.

Return type:

DataArray