Progress
This commit is contained in:
parent
1bf5f3eabe
commit
4f0c11cfca
1 changed files with 12 additions and 4 deletions
|
@ -1,8 +1,8 @@
|
|||
import datetime
|
||||
import shapely
|
||||
|
||||
LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per 1000m
|
||||
LAPSE_RATE_MOIST = 4.0 / 1000
|
||||
LAPSE_RATE_DRY = 9.8 # degrees C per 1000m
|
||||
LAPSE_RATE_MOIST = 4.0
|
||||
|
||||
class SoundingSample():
|
||||
__slots__ = (
|
||||
|
@ -45,12 +45,20 @@ class SoundingSample():
|
|||
|
||||
return 621.97 * (es / (self.pressure - es))
|
||||
|
||||
def lcl(self) -> float:
|
||||
return (self.temperature - self.dewpoint) / 8.0
|
||||
def lcl(self) -> float: # meters
|
||||
return (self.temp - self.dewpoint) / 0.008
|
||||
|
||||
def is_saturated(self) -> bool:
|
||||
return self.humidity >= 100.0
|
||||
|
||||
def lapse(self, h: float, rate=None) -> float:
|
||||
if rate is None:
|
||||
rate = LAPSE_RATE_MOIST if self.is_saturated() else LAPSE_RATE_DRY
|
||||
|
||||
hd = h - self.height
|
||||
|
||||
return self.temp - (rate * (hd / 1000))
|
||||
|
||||
class Sounding():
|
||||
__slots__ = (
|
||||
'id', 'station', 'timestamp_observed', 'timestamp_released',
|
||||
|
|
Loading…
Add table
Reference in a new issue