Search This Blog

Tuesday, February 26, 2008

weather in ithaca

To find the weather in Ithaca using a Linux box, add the following lines to the ~/.weatherrc . Use /etc/weatherrc for site-wide configuration.
$cat /home/rajulocal/.weatherrc
[default]
City = ITHACA
Forecast = True
ID = KITH
St = NY
After that you can get the current weather conditions and forecast by using the weather command.
$weather
Current conditions at Ithaca Tompkins Regional Airport (KITH)
Last updated Feb 26, 2008 - 05:56 PM EST / 2008.02.26 2256 UTC
Wind: from the WNW (300 degrees) at 3 MPH (3 KT)
Sky conditions: obscured
Weather: light snow; mist
Precipitation last hour: A trace
Temperature: 31.1 F (-0.5 C)
Relative Humidity: 95%
City Forecast for Ithaca, NY
Issued Tuesday afternoon - Feb 26, 2008
Tuesday night... Low 21, 100% chance of precipitation.
Wednesday... Snow showers, high 22, 80% chance of precipitation.
Wednesday night... Low 9, 40% chance of precipitation.
Thursday... Very cold, high 19.
Thursday night... Low 9.
Weather uses METAR data that it fetches from the the National Oceanic and Atmospheric Administration and forecasts from the National Weather Service. The list of weather stations and their codes can be obtained from http://www.rap.ucar.edu/weather/surface/stations.txt .

Tested on Debian Etch using
$weather --version
weather 1.2
Related links :-
  1. http://debaday.debian.net/2007/10/04/weather-check-weather-conditions-and-forecasts-on-the-command-line/
  2. http://www.rap.ucar.edu/weather/surface/stations.txt
  3. http://en.wikipedia.org/wiki/METAR

Followers