Implement virtual_temp()
This commit is contained in:
parent
42b98a8f0c
commit
a186f629d8
1 changed files with 11 additions and 0 deletions
|
@ -17,6 +17,17 @@ def kelvin(c: float) -> float:
|
|||
def celsius(k: float) -> float:
|
||||
return k - 273.15
|
||||
|
||||
def virtual_temp(temp: float, dewpoint: float, pressure: float) -> float:
|
||||
a = 7.5 * dewpoint
|
||||
b = 237.3 + dewpoint
|
||||
c = a / b
|
||||
|
||||
d = 6.11 * (10**c)
|
||||
e = d / pressure
|
||||
f = 1 - 0.379 * e
|
||||
|
||||
return celsius((temp + 273.15) / f)
|
||||
|
||||
def vapor_pressure(dewpoint: float) -> float:
|
||||
"""
|
||||
Return the pressure, in millibar, of vapor in a parcel of a given
|
||||
|
|
Loading…
Add table
Reference in a new issue