Compare commits
No commits in common. "9309393189be474e44155670c14d8cb3876583e8" and "52a5dceddfed86db545e8f99ddaa4b47f24ed01a" have entirely different histories.
9309393189
...
52a5dceddf
2 changed files with 3 additions and 4 deletions
|
@ -22,7 +22,7 @@ TEMP_CENTER = 0 # degrees C
|
|||
TEMP_STEP = 5
|
||||
TEMP_STEP_COUNT = math.ceil(TEMP_RANGE / TEMP_STEP)
|
||||
|
||||
SKEW = 0.6
|
||||
SKEW = 0.7
|
||||
|
||||
def clamp(value, lowest, highest):
|
||||
if value < lowest:
|
||||
|
|
|
@ -8,7 +8,6 @@ LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per km
|
|||
LAPSE_RATE_MOIST = 4.0 / 1000
|
||||
|
||||
PRESSURE_MAX = 1050 # millibar
|
||||
PRESSURE_MSL = 1013.25
|
||||
PRESSURE_MIN = 100
|
||||
PRESSURE_STEP = 50
|
||||
|
||||
|
@ -69,12 +68,12 @@ def lcl(temp: float, dewpoint: float) -> float:
|
|||
"""
|
||||
return (temp - dewpoint) / 0.008
|
||||
|
||||
def pressure_height(pressure: float, surface: float=PRESSURE_MSL) -> float:
|
||||
def pressure_height(pressure: float) -> float:
|
||||
"""
|
||||
Return the approximate altitude, in meters, for a given pressure in
|
||||
millibar.
|
||||
"""
|
||||
return (1 - (pressure / surface) ** 0.190284) * 145366.45 * 0.3048
|
||||
return (1 - (pressure / 1013.25) ** 0.190284) * 145366.45 * 0.3048
|
||||
|
||||
def lapse(temp: float, delta: float, rate=LAPSE_RATE_DRY) -> float:
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue