Add altimeter and sea level pressure calculations from station pressure - #4118
Open
fronzi wants to merge 1 commit into
Open
Add altimeter and sea level pressure calculations from station pressure#4118fronzi wants to merge 1 commit into
fronzi wants to merge 1 commit into
Conversation
…on_pressure Adds the analytic inverse of altimeter_to_station_pressure and exposes the hypsometric reduction from station pressure to sea-level pressure. Fixes Unidata#3369
Author
|
Thanks for picking this up. Working through the CLA now. Happy to rename the two functions if these don't match the convention you'd prefer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3369.
Adds two functions to
metpy.calc.basic:altimeter_from_station_pressure— the analytic inverse ofaltimeter_to_station_pressure, obtained by solving Equations 1 and 3 of the Smithsonian Handbook (1951) p. 269 for the altimeter setting rather than the station pressure.sea_level_pressure_from_station_pressure— exposes the hypsometric reduction thataltimeter_to_sea_level_pressurealready performs internally, for users who have station pressure rather than an altimeter setting.Verification:
altimeter_to_station_pressureagrees to ~1e-13 hPa, tested across numpy, masked, dask and xarray inputs via thearray_typefixture.sea_level_pressure_from_station_pressurecomposed withaltimeter_to_station_pressurereproducesaltimeter_to_sea_level_pressureto 8 decimals.Six tests added, plus entries in the Standard Atmosphere section of the docs.
Happy to rename either function if these don't fit the X_from_Y convention you'd prefer.