Skip to content

ENH: Add station pressure to altimeter and sea-level pressure conversions#4096

Open
manduinca wants to merge 2 commits into
Unidata:mainfrom
manduinca:feature/altimeter-from-station-pressure
Open

ENH: Add station pressure to altimeter and sea-level pressure conversions#4096
manduinca wants to merge 2 commits into
Unidata:mainfrom
manduinca:feature/altimeter-from-station-pressure

Conversation

@manduinca

Copy link
Copy Markdown

Description Of Changes

Adds the two forward conversions requested in #3369, since MetPy already had the inverses:

  • station_pressure_to_altimeter(pressure, height) — the analytic inverse of altimeter_to_station_pressure.
  • station_pressure_to_sea_level_pressure(pressure, height, temperature) — reduces a measured station pressure to sea level (Wallace & Hobbs eq. 2.29/2.31).

I derived both by inverting the existing functions rather than the NWS PDF mentioned in the issue, so the constants and references match what MetPy already uses (altimeter_to_station_pressure, Smithsonian Handbook 1951). Both use the standard @exporter.export / @preprocess_and_wrap / @check_units decorators and are registered in the API docs.

Tests cover reference values (inHg and hPa/masked arrays) plus round-trip checks against the existing inverse functions.

Checklist

@manduinca
manduinca requested a review from a team as a code owner July 16, 2026 04:22
@manduinca
manduinca requested review from dopplershift and removed request for a team July 16, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calculate altimiter values from station pressure?

1 participant