Move units conversion to units.py
This commit is contained in:
parent
1b7952b94e
commit
a231954de1
1 changed files with 1 additions and 6 deletions
|
@ -3,6 +3,7 @@ import math
|
|||
from typing import Callable
|
||||
|
||||
from xmet.series import Series
|
||||
from xmet.units import rad, kelvin, celsius
|
||||
|
||||
LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per km
|
||||
|
||||
|
@ -11,12 +12,6 @@ PRESSURE_MSL = 1013.25
|
|||
PRESSURE_MIN = 100
|
||||
PRESSURE_STEP = 50
|
||||
|
||||
def kelvin(c: float) -> float:
|
||||
return 273.15 + c
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue