Compare commits
2 commits
d8af90872f
...
2c7c1cfc84
Author | SHA1 | Date | |
---|---|---|---|
2c7c1cfc84 | |||
37cac68e87 |
2 changed files with 14 additions and 4 deletions
|
@ -165,9 +165,6 @@ class Hodograph():
|
||||||
|
|
||||||
def each_significant_sample(self, sounding: Sounding):
|
def each_significant_sample(self, sounding: Sounding):
|
||||||
for sample in sounding.samples:
|
for sample in sounding.samples:
|
||||||
if sample.pressure < 0 or sample.pressure is None:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if sample.height is None:
|
if sample.height is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,18 @@ class Sounding(DatabaseTable):
|
||||||
'data_source_pressure', 'data_source_other', 'samples', 'location'
|
'data_source_pressure', 'data_source_other', 'samples', 'location'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
parts = [
|
||||||
|
f"Sounding from station {self.station}"
|
||||||
|
]
|
||||||
|
|
||||||
|
if self.location is not None:
|
||||||
|
parts.append(f"(location {self.location})")
|
||||||
|
|
||||||
|
parts.append(f"observed {self.timestamp_observed}")
|
||||||
|
|
||||||
|
return ' '.join(parts)
|
||||||
|
|
||||||
__table__ = 'xmet_sounding'
|
__table__ = 'xmet_sounding'
|
||||||
__key__ = 'id'
|
__key__ = 'id'
|
||||||
|
|
||||||
|
@ -118,6 +130,7 @@ class Sounding(DatabaseTable):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.id = None
|
self.id = None
|
||||||
|
self.location = None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def valid_by_station(db: Database,
|
def valid_by_station(db: Database,
|
||||||
|
|
Loading…
Add table
Reference in a new issue