Hi everyone -
I wrote a week or so ago that I was working on some PHP code to interface to this service. As far as I can see, the NDFD (National Digital Forecast Database) is a fairly stable service, and it seems to work nationwide (vs. some that worked in some NOAA regions only, or others, or that seemed to extract from this very lower-level SOAP service.)
I'm using the NuSOAP PHP package located at
http://sourceforge.net/projects/nusoap/.
I'm also using a modified XML PHP package located at
https://github.com/rmccue/XMLize/wiki, and calls that package in a way that comes from the pxweather package at
http://pxweather.abbett.org/, although the interface used in my package is completely different from this one.
My package calls two different services, and combines the result together. First, it calls the NDFDgenByDay service, to get basic elements of a forecast array, 12 hours apart, including names for the elements of the forecast array, man/min temperatures, and basic weather conditions. Second, it then calls the NDFDgen service to obtain details, which then are mapped into those 12 hour blocks in various ways. I then do work changing the icons to use precipitation percentage icons more often than the default NWS does (which started this), and also create text snippets to build a basic 'forecast line' from the data. The result is an array of 13 nodes, an example of one of these nodes follows. Calling it, you just give a lat/long. It caches the NDFD information, and will only allow refreshes of it every 60 minutes, to avoid hitting the NWS servers too much. (Of course, calling with different lat/long produces different cache files.)
I'm hoping this service stays stable. If it does, it will allow me a way to pull together elements of a forecast that allow me to avoid worrying about scraping together text from web pages.
My next task is to build the typical 'row of forecast icons + forecasts' HTML from this array, and then compare them over time to the NWS forecast summaries, to make sure I've done this reasonably well.
After that, I want to add information from the NWS CAP/ATOM feeds for alerts, warnings, etc.
My final goal is to not use the NDFDgenByDay service at all, and build everything from just the 'detailed' call. That probably will begin during the end of year holiday break.
I have to be honest and say this is all more than a bit of a pain, especially because the time-intervals given for different items in NDFDgen do not always match up, requiring working through that.
(
[period-name] => Today
[weather-summary] => Rain
[conditions-text] => Moderate rain certain.
[temperature-text] => High of 63.
[high-temperature] => 63
[temperature-units] =>
[low-temperature] =>
[probability-of-precipitation-percent] => 100
[rain-amount] => 0.45
[rain-units] => inches
[snow-amount] => 0
[snow-units] => inches
[precipitation-text] => Expecting approximately 0.45 inches of rain.
[cloud-low] => 70
[cloud-high] => 93
[cloud-text] => Cloud coverage 70-93% of forecast area.
[conditions-icon] => weather_parser/icons/ra100.jpg
[humidity-low] => 70
[humidity-high] => 78
[humidity-text] => Humidity 70-78%
[wind-sustained-low] => 7
[wind-sustained-high] => 9
[wind-speed-units] => mph
[wind-gust-low] => 9
[wind-gust-high] => 13
[wind-text] => Sustained winds W-NW at 7 to 9 mph; gusting winds at 9 to 13 mph.