Remove implicit dewpoint argument
This commit is contained in:
parent
c0ed20cce5
commit
ac2e17e61f
2 changed files with 4 additions and 4 deletions
|
@ -129,7 +129,7 @@ class SkewTGraph():
|
||||||
cr.set_source_rgba(1.0, 0.2, 0, 0.2)
|
cr.set_source_rgba(1.0, 0.2, 0, 0.2)
|
||||||
|
|
||||||
for temp in range(-140, 140, 10):
|
for temp in range(-140, 140, 10):
|
||||||
self.draw_adiabat(cr, x, y, temp, PRESSURE_MAX, lambda t, d, p: LAPSE_RATE_DRY)
|
self.draw_adiabat(cr, x, y, temp, PRESSURE_MAX, lambda t, p: LAPSE_RATE_DRY)
|
||||||
|
|
||||||
cr.set_source_rgba(0.3, 0.1, 0, 0.2)
|
cr.set_source_rgba(0.3, 0.1, 0, 0.2)
|
||||||
|
|
||||||
|
|
|
@ -62,13 +62,13 @@ def lapse(temp: float, delta: float, rate=LAPSE_RATE_DRY) -> float:
|
||||||
"""
|
"""
|
||||||
return temp - (rate * delta)
|
return temp - (rate * delta)
|
||||||
|
|
||||||
def moist_lapse_rate(temp: float, dewpoint: float, pressure: float) -> float:
|
def moist_lapse_rate(temp: float, pressure: float) -> float:
|
||||||
g = 9.8076
|
g = 9.8076
|
||||||
Hv = 2501000
|
Hv = 2501000
|
||||||
Rsd = 287
|
Rsd = 287
|
||||||
Rsw = 461.5
|
Rsw = 461.5
|
||||||
Cpd = 1003.5
|
Cpd = 1003.5
|
||||||
r = saturated_mixing_ratio(dewpoint, pressure)
|
r = saturated_mixing_ratio(temp, pressure)
|
||||||
T = kelvin(temp)
|
T = kelvin(temp)
|
||||||
|
|
||||||
return g * (1 + (Hv * r) / (Rsd * T)) \
|
return g * (1 + (Hv * r) / (Rsd * T)) \
|
||||||
|
@ -99,7 +99,7 @@ def loft_parcel(start_temp: float,
|
||||||
height_last = height
|
height_last = height
|
||||||
|
|
||||||
try:
|
try:
|
||||||
rate = lapse_rate(temp, temp, pressure)
|
rate = lapse_rate(temp, pressure)
|
||||||
except OverflowError:
|
except OverflowError:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue