Pregunta

When using a cool PHP Library I find to get NOAA weather (https://github.com/amwhalen/noaa), I found that the results it returned differed from what I found on weather.gov. I found the weather.gov XML by simply clicking the button on the the page for my location.

They differ by a few degrees, have different date formats, and one shows the LOW before the HIGH (as opposed to HIGH before LOW). Which is more accurate: NOAA API or Weather.gov? Should I use a different library? I would use The Weather Channel (also Weather Underground according to their API), but forecasts more than 3 days costs money.

URLs:

  • PHP NOAA (ndfd):
    http://graphical.weather.gov/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?lat=LATITUDEHERE&lon=LONGITUDEHERE&startDate=2013-10-21&numDays=7&format=24+hourly&Unit=e
  • Weather.gov ("MapClick"):
    http://forecast.weather.gov/MapClick.php?lat=LATITUDEHERE&lon=LONGITUDEHERE&unit=0&lg=english&FcstType=dwml

UPDATE: Thank you Sammitch and Jeroen! What you say would have to be true. The results will vary. It doesn't make sense how they are both technically NOAA but have different results, but whatever (you would think that they would be using the same predictions and algorithms). I'm going to go with the direct NOAA for now since there are quite a few libraries and lots of documentation. I found another awesome PHP implementation here: Simple NWS.

¿Fue útil?

Solución

Weather predication is not an exact science. Depending on the model used, it can yield different results. One time one will be correct, the other time the other.

Best thing is to just to pick the one that is easiest to implement and which has the best documentation. It will save you time and frustration in the future.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top