Ends vs. expires in alerts endpoint #385
-
Can you please describe how to evaluate the effective and ends fields in the /alerts endpoints? If we look at this winter weather advisory https://api.weather.gov/alerts/NWS-IDP-PROD-3907973-3326361 the expires time appears to be roughly when the snow is expected to start falling, and the ends time is the end of the alert which matches the text in the description field. Looking at a flood warning https://api.weather.gov/alerts/NWS-IDP-PROD-3907292-3326007 there is no ends time, only an expires time. Ultimately, I'm looking for a set of rules by which to determine what alerts to show to a user and which are no longer relevant. Note that I'm pulling the list of alerts to parse from https://api.weather.gov/alerts?status=actual&point=x,y |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Product Expiration Time is when the product message expires and a message containing updated information about the event should be expected before this time. This is generally only applicable to long-duration products. Event Ending Time is when the event is no longer valid (when the warned conditions are no longer expected to occur). In your example of the winter weather advisory, the event may be expected to last 48 hours (the event ending time) but there will be multiple messages across this period with updates to the situation. The product expiration time indicates when these messages should be considered out-of-date. In the case of the flood warning these are often issued "until further notice"; these will have a null ending time since they are indefinite warnings for long-term flooding. The /alerts/active endpoint automatically removes out-of-date products once an updated one has been issued. This is indicated by the |
Beta Was this translation helpful? Give feedback.
-
That's exactly the information I was looking for. Can you add a link to NWS Directive 10-1701 somewhere in the FAQ or other documents on this site? Browsing though it has cleared up a lot of other questions that I've had regarding the data in the API. I'm sure it would benefit others too. |
Beta Was this translation helpful? Give feedback.
-
This morning, when doing an /alerts/active status=actual, point=mylat,mylon and I am getting 3 freeze watches. https://api.weather.gov/alerts/NWS-IDP-PROD-4200437-3550625 The first (..625) seems to be a bit outside the area. The lat/lon of the query is in zone MDZ503. Do you know why this one got included when the alert doesn't mention that zone? The county is split between MDZ503 and MDZ504. Does that have something to do with it? The second two (...626 and ...627) are mostly identical: one being an update of the other. The update does have references, but they refer to yet other freeze watches. The referred alerts do have replacedBy fields as mentioned in the Nov 12 response above, but NWS-IDP-PROD-4200438-3550626 does not. Should that old one (626) have even been included? Diff of the 2nd and 3rd alerts
|
Beta Was this translation helpful? Give feedback.
-
Ah, I think I see what is happening for the two alerts (...626 and ...627). They are NOT related, just different watches issued for different dates. The fact the one was marked as an update made me think it was related to the other as they were so similar. |
Beta Was this translation helpful? Give feedback.
expires
andends
correspond to the Product Expiration Time and Event Ending Time, respectively, as defined in NWS Directive 10-1701 § 3.9.2.Product Expiration Time is when the product message expires and a message containing updated information about the event should be expected before this time. This is generally only applicable to long-duration products.
Event Ending Time is when the event is no longer valid (when the warned conditions are no longer expected to occur).
In your example of the winter weather advisory, the event may be expected to last 48 hours (the event ending time) but there will be multiple messages across this period with updates to the situation. The product expirat…