[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AWIPS #GZA-239192]: LDAD Mesonet - Plotting with DAF
- Subject: [AWIPS #GZA-239192]: LDAD Mesonet - Plotting with DAF
- Date: Tue, 22 Sep 2020 16:15:04 -0500
Hi Justin,
times[-10:-1] is actually the last 10 available times - but could be less than
10 minutes. If you are wanting to do a timerange, you can do the following for
example to get the last 60 minutes:
from dynamicserialize.dstypes.com.raytheon.uf.common.time import TimeRange
# Time range
lastHourDateTime = datetime.utcnow() - timedelta(minutes = 60)
start = lastHourDateTime.strftime('%Y-%m-%d %H:%M:%S')
end = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')
beginRange = datetime.strptime( start , "%Y-%m-%d %H:%M:%S")
endRange = datetime.strptime( end , "%Y-%m-%d %H:%M:%S")
timerange = TimeRange(beginRange, endRange)
# Get response
response = DataAccessLayer.getGeometryData(request,timerange)
This was also used in this example:
http://unidata.github.io/python-awips/examples/generated/Regional_Surface_Obs_Plot.html
Thanks,
Tiffany Meyer
AWIPS Lead Software Engineer
UCAR-Unidata
If you're interested, please feel free to fill out a survey about the support
you receive: https://forms.gle/tKG5SY9YJw4vBRVXA
Ticket Details
===================
Ticket ID: GZA-239192
Department: Support AWIPS
Priority: Low
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.