Find observed timestamp of BUFR sounding
This commit is contained in:
parent
322c7fa6bb
commit
6e13729a8c
1 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
import datetime
|
||||||
|
|
||||||
from typing import Self
|
from typing import Self
|
||||||
|
|
||||||
from awips.dataaccess import DataAccessLayer
|
from awips.dataaccess import DataAccessLayer
|
||||||
|
@ -52,6 +54,12 @@ class BUFRSounding(Sounding):
|
||||||
|
|
||||||
sounding = BUFRSounding()
|
sounding = BUFRSounding()
|
||||||
|
|
||||||
|
dt = response[0].getDataTime()
|
||||||
|
epoch = dt.getRefTime().time / 1000.0
|
||||||
|
|
||||||
|
sounding.timestamp_observed = datetime.datetime.fromtimestamp(epoch,
|
||||||
|
datetime.UTC)
|
||||||
|
|
||||||
for item in response:
|
for item in response:
|
||||||
params = item.getParameters()
|
params = item.getParameters()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue