Poking Around Weather via WAP/WML

Alan Levine aka CogDog barked this January 29th, 2005 10:54 pm

As a geek happens a lot- I get curious and start poking around on the net, peeking at web page source code. Tonight, I was checking out the NOAA weather forecast for near our cabin and there was a little note near the top:

New! Cell Phone (wap) URL: www.srh.noaa.gov/wml

Now I have a stone age cell phone with no hope of being WAP capable (Wireless Application Protocol) but vaguely recollect how the limited display capabilities require web content in WML form (Wireless Markup Language). Well, see more on the WAP/WML acronym soup from W3Schools.

You can get at info pretty quickly through WAP since it is designed to be just data, structured, and lightweight (the NOAA urls load s-l-o-w on the 28 bps modem speed up here).

So here is what I dug up….

Poking at the XML source of the NOAA WAP site It is some HTML, wrapped inside <card>…</card> tags and I could see that each has a web form like quality and a URL that passes the selections to another script.

The “O” card seems to pass a parameter stid to another URL, and it is asking for an “Ob ID” number, some sort of weather station ID. I took some bad guesses, then did a google on “Ob Site ID NOAA” which got me to a list of NOAA Observation Sites.

&lt;card id="O" title="Enter Ob ID"&gt;
&lt;p align="center"&gt;
  National Weather&lt;br/&gt;
  Service&lt;br/&gt;
  Southern Region&lt;br/&gt;&lt;br/&gt;
  Enter Observation ID:&lt;br/&gt;
  Example: kdfw&lt;br/&gt;
  &lt;input name="stid" format="4M" size="4" maxlength="4" /&gt;&lt;br/&gt;
  &lt;a href="/wml/wapob.php?stid=$(stid)"&gt;Go to Ob&lt;/a&gt;&lt;br/&gt;
&lt;br/&gt;
&lt;do type="accept" label="Back" name="Back2"&gt;
  &lt;go href="#select" /&gt;
&lt;/do&gt;
&lt;/p&gt;
&lt;/card&gt;

Curious about the weather home in Phoenix, the magic code was “kphx”, or the URL plucked from the XML above:
http://www.srh.noaa.gov/wml/wapob.php?stid=kphx

which gives the current weather from Phoenix in only 0.7k of data.

Now I had the game figured out, and going to another card, I could make out a URL to pass as a parameter a US zipcode for a current weather forecast, so WAP-ing to
http://www.srh.noaa.gov/wml/wap_zc.php?zc=85544

which not only has current weather in Pine, but links to satellite images (WAP ready I bet) and more info. Of course, I could just poke my geek head out the window and confirm it is snowing (I just did that).

What is the real discovery? Not much. I doubt I will be looking up weather in XML format. But talk about some “small pieces”… this is a half nugget of data that can be accessed not only by WAP able phones but anything that can parse some XML, and the devices that do this manage it seamlessly, you never even see the code. XML has been around for some time, but it is become more transparent and powerful at the same time.

Great. Not only do I still need an iPod, I will be aching for a new phone.

3 Responses to “Poking Around Weather via WAP/WML”

  1. Gerry Says:

    Have you also tried http://www.rssweather.com ?

  2. Alan Levine Says:

    Absolutely, it has been part of my personal feedrolll for a year:

    http://www.rssweather.com/zipcode/85544/wx.php

  3. Bruce Landon's Weblog for Students Says:

    blog tech

    Poking Around Weather via WAP/WML .


Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License
and may be patrolled by a friendly small dog (with a wagging tail)
This means you are free to use any original content published here (begs the question why)
as long as you provide linktribution.

.