Move magic value into class variable

This commit is contained in:
XANTRONIX 2025-04-16 11:17:50 -04:00
parent d1f961ecf2
commit d0cb897725

View file

@ -11,6 +11,8 @@ from xmet.units import celsius
class BUFRSounding(Sounding):
EDEX_HOST = 'edex-cloud.unidata.ucar.edu'
BUFR_SOURCE = 'UCAR'
BUFR_TYPE = 'bufrua'
BUFR_PARAMS_MAN = set(['prMan', 'htMan', 'wdMan', 'wsMan'])
BUFR_PARAMS_SIGT = set(['prSigT', 'htSigT', 'tpSigT', 'tdSigT'])
@ -108,8 +110,8 @@ class BUFRSounding(Sounding):
timestamp = datetime.datetime.fromtimestamp(epoch, datetime.UTC)
sounding.station = response[0].getLocationName()
sounding.data_source_pressure = 'UCAR'
sounding.data_source_other = 'UCAR'
sounding.data_source_pressure = BUFRSounding.BUFR_SOURCE
sounding.data_source_other = BUFRSounding.BUFR_SOURCE
sounding.location = shapely.Point(geom.x, geom.y)
sounding.timestamp_observed = timestamp