Compare commits
2 commits
e87d672830
...
0293905b74
Author | SHA1 | Date | |
---|---|---|---|
0293905b74 | |||
aa0977c04b |
2 changed files with 4 additions and 2 deletions
lib/xmet
|
@ -78,6 +78,7 @@ class IGRAReader():
|
|||
sample.height_qa = match['zflag']
|
||||
sample.temp = parse_num(match['temp'], 0.1)
|
||||
sample.temp_qa = match['tflag']
|
||||
sample.humidity = parse_num(match['rh'], 0.1)
|
||||
sample.dewpoint = None
|
||||
sample.wind_dir = parse_num(match['wdir'], 1.0)
|
||||
sample.wind_speed = parse_num(match['wspd'], 0.1)
|
||||
|
|
|
@ -4,8 +4,6 @@ import shapely
|
|||
LAPSE_RATE_DRY = 9.8 / 1000 # degrees C per 1000m
|
||||
LAPSE_RATE_MOIST = 4.0 / 1000
|
||||
|
||||
MIXING_RATIO_CONST = 621.97
|
||||
|
||||
class SoundingSample():
|
||||
__slots__ = (
|
||||
'id', 'sounding_id', 'elapsed', 'pressure', 'pressure_qa',
|
||||
|
@ -47,6 +45,9 @@ class SoundingSample():
|
|||
|
||||
return 621.97 * (es / (self.pressure - es))
|
||||
|
||||
def lcl(self) -> float:
|
||||
return (self.temperature - self.dewpoint) / 8.0
|
||||
|
||||
def is_saturated(self) -> bool:
|
||||
return self.humidity >= 100.0
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue