Skip to content

Converting pressure to height #1779

Discussion options

You must be logged in to vote

pressure_to_height_std assumes a U.S. Standard Atmosphere, which itself prescribes a particular vertical temperature profile--so unfortunately, you can't give it any temperature information. Whether you can use it depends on whether that assumption is good enough for your purposes.

thickness_hydrostatic calculates the thickness of a layer, given a profile (you can optionally give the function an entire profile and tell it the bottom layer and depth in pressure. I was able to make the function work with the following code:

import metpy.calc as mpcalc
from metpy.units import units
import numpy as np

press = np.array([1000., 500.]) * units.hPa
temp = np.array([0., -20.]) * units.degC
mpcalc.t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@IreneCrisologo
Comment options

Answer selected by dopplershift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants