Move magic value into class variable
This commit is contained in:
parent
d1f961ecf2
commit
d0cb897725
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue