2

i trying to get hourly forecast using NOAA but it doesnt let me enter East longitude. The request has to be west longitude.

do they even provide service for east longitude for asian countries like India.

here is the link i used http://graphical.weather.gov/xml/SOAP_server/ndfdXML.htm

or could you give me any other link who give hourly forecast in the API. i tried yahoo weather, weatherbug, world weather online. they are not giving hourly forecast in the API.

Thanks!

Sharath B. Patel
  • 401
  • 1
  • 6
  • 15
  • It seems that API only provides national weather, where the nation in question is the US. I tried to enter the coordinates to my home (in Sweden, around 12 degrees east) and could not get anything either. – Some programmer dude Oct 18 '11 at 07:19

1 Answers1

3

Here is a partial solution based on my work with the NOAA API:

NOAA works by weather station, so the URL will vary depending on the station closest to you. In my case, I am using the Western Region station:

http://www.wrh.noaa.gov/forecast/xml/xml.php?duration=#{duration}&interval=#{interval}&lat=#{latlong[0]}&lon=#{latlong[1]}

Here is my implementation in Ruby for retrieving the 7-day forecast in 6-hour intervals by zipcode:

https://raw.github.com/WalterYu/stormsavvy/master/lib/weather/noaa_forecast.rb

Hope that helps you in getting started.

kharma
  • 51
  • 5
  • 1
    Actually, I'm pretty sure the forecast is gridded. That's why their APIs require lat-lons instead of station IDs. Anyway...this URL is hottt! Previously I was working with e.g. http://forecast.weather.gov/MapClick.php?lat=39.00214&lon=-119.94936&FcstType=json, which provides only 12-hour increments and only for temp/precip. Instead, this URL offers hourly increments up to a week out for temp, precip, wind. Awesome. For future googlers, `duration` and `interval` are hours as ints. So e.g. http://www.wrh.noaa.gov/forecast/xml/xml.php?duration=168&interval=1&lat=39.00214&lon=-119.94936 – ericsoco May 05 '16 at 18:18