Author Topic: NWS responds to api.weather.gov questions...  (Read 5053 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
NWS responds to api.weather.gov questions...
« on: March 06, 2018, 10:54:16 AM »
After multiple attempts, I have received a response from the NWS about the issues/future plans for api.weather.gov and forecast.weather.gov.  Here's my letter and responses
Quote
Good afternoon Ken,

Per my message yesterday, I'm emailing to respond to the questions you raised in your previous email.  Please see my responses that have been indented and in bold.

1) The SSL certificate used to load resources from https://api.weather.gov will be distrusted in Google Chrome M70. Once distrusted, users will be prevented from loading these resources.  I hope the certificate can be replaced before expiration.

    I've been informed that the SSL certificates will be re-issued this week to address this issue.

2) Several months ago, the API started responding to any /point/lat,long request with a 301-Moved Permanently to a /gridpoint request.  That is unusual behavior for a REST API, and causes two HTTPS accesses to api.weather.gov to get data.  Generally, one would either expect a 200 response with data, or a 40x or 50x response indicating 'data not available'.  I see the current API returns 404 (Not Found) for the /gridpoint request if the forecast data is not currently available, and that is ok .. my script will switch to a Zone forecast for the area instead.

    This redirect was done to improve performance of the API.  That endpoint (/point/lat,long) now is a translation service to the /gridpoint endpoint.  You can avoid the redirect by using the /gridpoint endpoint directly.  You'd need to know the Weather Forecast Office (WFO) and points.  If you didn't have it, here is a link to the documentation outlining the api endpoints we have available: https://www.weather.gov/documentation/services-web-api.  Please note we are working toward improving our documentation, in addition to adding more endpoints.  Let me know if that helps.

3) On multiple occasions, for various locales, the API will not offer a /gridpoint forecast for up to 10 hours, then it suddenly appears to work again.

    This issue was due to some recent work being performed in our data center that caused issues with the system's ability to retrieve and ingest data into our systems.  The root issue has been resolved now.  Are you still experiencing an issue?

4) On multiple occasions, the text part of a /gridpoint forecast will return numerical values like 3.5E37 for temperatures or wind chill or wind speed.  Or reporting text of 'Rainfall amounts of ... inches' even when the temperature forecast is below 32F.

    This may be a rounding error that needs to be addressed.  Members of my development staff familiar with this application are currently involved in a software development sprint, so we'll need to take a better look at this once the sprint commences.  That should happen within the next several weeks.

5) Not all of the alerts shown on the current forecast.weather.gov appear in the forecast-v3.weather.gov (or the API).  Notably missing are "Outlook" and "Short Term Forecast" types, and sometimes even "Watch" and "Warning" types.  The alerts do appear on alerts.weather.gov XML RSS feeds, and on the current forecast.weather.gov site for a point forecast, just not reliably in the api.weather.gov feeds.

    This could be due to a couple things.  One could be due to different data sources.  The api.weather.gov service posts alerts that are sent through Common Alerts Protocol (CAP) version 1.2  while the current alerts.weather.gov application uses CAP 1.1.  We've discovered that not all products in CAP 1.1 are available in CAP 1.2.  Do you have specific alerts that you noticed were not available on alerts.weather.gov, but available on alerts-v2.weather.gov (alerts-v2.weather.gov leverages api and CAP 1.2)?  Alternately, the issue could be due to internal filtering within our application.  Knowing the specific alerts will aid us in determining the root cause.

6) lastly a question:  It has been over a year since the new forecast-v3.weather.gov site was planned for implementation but no word after the 'on hold' message shortly before the last planned implementation date.  Is the project still planned for implementation, and if so, when is the targeted date.

    Yes, the project is still planned for implementation.  We experienced some infrastructure challenges with how we are planning to ensure up-time of the application.  Those issues are being worked through.  There are a couple more steps that we need to take.  As of this email, we don't have a target date, but looking to address these steps in the summer of 2018. 

Please let me know if you have any additional questions or if you need more information on any of these items.

Thanks.

Paul Iwugo, PMP
Chief, Software Development Branch
NOAA | NWS | NCEP | NCO

It looks like the issues we've experienced with the advforecast2.php JSON V5.x using api.weather.gov are being addressed and should be reduced in the future.  I still question the wisdom of using a /point request as a 'lookup' for a /gridpoint (via a 301 redirect) as no other REST API offered seems to behave that way, but I'll be adjusting the advforecast2.php script to cache the /gridpoint response and use it instead for the /point url (that way, one HTTPS access will be omitted when the cache for forecast data is refreshed.

Based on Paul's responses, the next cutover for forecast.weather.gov to the new API design is later in 2018.

A useful nugget is the new NWS documentation at https://www.weather.gov/documentation/ for
    API Web Service
    Forecast Web Service
    Alerts Web Service

Very useful!

I'll keep you posted as the discussions progress.

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline WeatherHost

  • Forecaster
  • *****
  • Posts: 3649
Re: NWS responds to api.weather.gov questions...
« Reply #1 on: March 06, 2018, 12:52:49 PM »
Wouldn't it be easier if people just stopped using the G browser?


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NWS responds to api.weather.gov questions...
« Reply #2 on: March 06, 2018, 01:05:51 PM »
Wouldn't it be easier if people just stopped using the G browser?
I'm assuming that comment was related to the certificate expiration.  No, wouldn't be easier.  The problem was with a Certificate Authority issue that causes Symantec CA certs to be en mass expired due to a third-party disclosure of about 27,000 private keys -- a big no-no.
Firefox will also do the revocations too.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything