NWS used by Weather Report has bad international coverage

Asked by Thomas N on 2007-06-27

I live in one of the top 5 biggest cities in Sweden but even so I cannot choose it in the Weather Report applet. If this application were to use weather.com instead (as for example Xbox Media Center, XBMC, does), more cities would be available.

Is there an alternative to Weather Report or is it possible to change source?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-applets Edit question
Assignee:
No assignee Edit question
Solved by:
Cesare Tirabassi
Solved:
2007-06-27
Last query:
2007-06-27
Last reply:
2007-06-27
Cesare Tirabassi (norsetto) said : #1

The location source for the applet is:

http://cvs.gnome.org/viewcvs/gnome-applets/gweather/Locations.xml.in

In this I find quite a number of locations in Sweden.

    <_name>Sweden</_name>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Borlänge</_name>
      <code>ESSD</code>
      <coordinates>60-26N 015-31E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Gällivare</_name>
      <code>ESNG</code>
      <coordinates>67-09N 020-39E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden.
           The native name is "Göteborg". Please use that unless
           you are sure that it has a different name in your language.
        -->
      <_name>Gothenburg</_name>
      <location>
        <!-- Translators: This is in Gothenburg in Sweden. -->
        <_name>Landvetter</_name>
        <code>ESGG</code>
        <coordinates>57-40N 012-18E</coordinates>
      </location>
      <location>
        <!-- Translators: This is in Gothenburg in Sweden. -->
        <_name>Säve</_name>
        <code>ESGP</code>
        <coordinates>57-47N 011-53E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Halmstad</_name>
      <code>ESMT</code>
      <coordinates>56-41N 012-50E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Hultsfred</_name>
      <code>ESSF</code>
      <coordinates>57-31N 015-50E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Jönköping</_name>
      <code>ESGJ</code>
      <coordinates>57-46N 014-05E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Kalmar</_name>
      <code>ESMQ</code>
      <coordinates>56-44N 016-18E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Karlstad</_name>
      <code>ESOK</code>
      <coordinates>59-26-41N 013-20-15E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Kiruna</_name>
      <code>ESNQ</code>
      <coordinates>67-49N 020-20E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Kramfors</_name>
      <code>ESNK</code>
      <coordinates>63-03N 017-46E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Kristianstad</_name>
      <location>
        <!-- Translators: This is in Kristianstad in Sweden. -->
        <_name>Everöd</_name>
        <code>ESMK</code>
        <coordinates>55-55N 014-05E</coordinates>
      </location>
    </city>
    <city>
     <!-- Translators: This is in Sweden. -->
     <_name>Linköping</_name>
     <location>
       <!-- Translators: This is in Linköping in Sweden. -->
       <_name>Saab</_name>
       <code>ESSL</code>
       <coordinates>58-24N 015-41E</coordinates>
     </location>
    </city>
    <city>
     <!-- Translators: This is in Sweden. -->
     <_name>Ljungbyhed</_name>
     <location>
       <!-- Translators: This is in Ljungbyhed in Sweden. -->
       <_name>Location 1</_name>
       <code>ESTL</code>
       <coordinates>56-04N 013-12E</coordinates>
     </location>
    </city>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Luleå</_name>
      <location>
        <!-- Translators: This is in Umeå in Sweden. -->
        <_name>Kallax</_name>
        <code>ESPA</code>
        <coordinates>65-33N 022-08E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Lycksele</_name>
      <code>ESNL</code>
      <coordinates>64-32-51N 018-43-03E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Malmö</_name>
      <location>
        <!-- Translators: This is in Malmö in Sweden. -->
        <_name>Sturup</_name>
        <code>ESMS</code>
        <coordinates>55-33N 013-22E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Norrköping</_name>
      <code>ESSP</code>
      <coordinates>58-35N 016-09E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Örebro</_name>
      <code>ESOE</code>
      <coordinates>59-14N 015-03E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Örnsköldsvik</_name>
      <code>ESNO</code>
      <coordinates>63-24N 018-58E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Östersund</_name>
      <location>
        <!-- Translators: This is in Östersund in Sweden. -->
        <_name>Frösön</_name>
        <code>ESPC</code>
        <coordinates>63-11N 014-30E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Ronneby</_name>
      <code>ESDF</code>
      <coordinates>56-16N 015-17E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Siljan/Mora</_name>
      <code>ESKM</code>
      <coordinates>60-58N 014-31E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Skellefteå</_name>
      <code>ESNS</code>
      <coordinates>64-38N 021-05E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Skövde</_name>
      <code>ESGR</code>
      <coordinates>58-27N 013-58E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Söderhamn</_name>
      <code>ESNY</code>
      <coordinates>61-15-41N 017-05-57E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Stockholm</_name>
      <location>
        <!-- Translators: This is in Stockholm in Sweden. -->
        <_name>Arlanda</_name>
        <code>ESSA</code>
        <coordinates>59-39N 017-57E</coordinates>
      </location>
      <location>
        <!-- Translators: This is in Stockholm in Sweden. -->
        <_name>Bromma</_name>
        <code>ESSB</code>
        <coordinates>59-21N 017-57E</coordinates>
      </location>
      <location>
        <!-- Translators: This is in Stockholm in Sweden. -->
        <_name>Skavsta</_name>
        <code>ESKN</code>
        <coordinates>58-47N 016-55E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Sundsvall-Härnösand</_name>
      <code>ESNN</code>
      <coordinates>62-32N 017-27E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Trollhättan</_name>
      <code>ESGT</code>
      <coordinates>58-19N 012-21E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Umeå</_name>
      <code>ESNU</code>
      <coordinates>63-48N 020-17E</coordinates>
    </location>
    <city>
      <!-- Translators: This is in Sweden. -->
      <_name>Västerås</_name>
      <location>
        <!-- Translators: This is in Västerås in Sweden. -->
        <_name>Hässlö</_name>
        <code>ESOW</code>
        <coordinates>59-35N 016-38E</coordinates>
      </location>
    </city>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Växjö</_name>
      <code>ESMX</code>
      <coordinates>56-51N 014-50E</coordinates>
    </location>
    <location>
      <!-- Translators: This is in Sweden. -->
      <_name>Visby</_name>
      <code>ESSV</code>
      <coordinates>57-40N 018-21E</coordinates>
    </location>
  </country>
  <country>

So, in principle you should be able to find a source relatively close to where you are!?

No, I'm afraid not. Closest to my town, Helsingborg, is more than 60 km away.

Ps. This data is also possible to get from http://weather.noaa.gov/weather/SE_cc.html.

Best Cesare Tirabassi (norsetto) said : #3

Hmmm, Helsingborg is only 8th on the list :)

http://www.citypopulation.de/Sweden-UA.html

In any case, you can add it to your locations list.
For instance, give this command in a terminal:

sudo gedit /usr/share/gnome-applets/gweather/Locations.xml

find sweden and add your nearest airport (Ängelholm) like this:

    <location>
      <name>Ängelholm</name>
      <name xml:lang="sv">Ängelholm</name>
      <code>ESTA</code>
      <coordinates>56-17N 012-50E</coordinates>
    </location>

Do it at the beginning of the list, just before Borlänge.

After this, you can select it from the applet with Preferences/Location.

Just now is cloudy 17 C .....

Cesare Tirabassi (norsetto) said : #4

By the way, you can ask Gnome for this to be included permanently in the list:

http://bugzilla.gnome.org/

Thanks Cesare Tirabassi, that solved my question.

I'm just curious on where you found Ängelholm?

Cesare Tirabassi (norsetto) said : #7

Just googled Helsingborg Airport :) Google is OUR friend....

Hmm, but how do you just by knowing that know how to create this entry? The link I provided lists all the current locations just as you can see them in Weather Report. Does NWS keep track of all airports, even those not listed on their page?

Cesare Tirabassi (norsetto) said : #9

Well, that was a bit more difficult. First of all I had a look at the source code, just grepping http to see what it was looking for. Having spotted the link I gave you in the first email I looked at the packaging and I noted the file /usr/share/gnome-applets/gweather/Locations.xml
Once I opened it it was easy to see how it was coded, so, once I got from google the airport data (mainly location and code) I added the info, checked it was working and provided it to you.
If you are interested, here is a list of sites the applet is searching for data or have been used as sources:

http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?%s.txt
http://www.crh.noaa.gov/arx/wx.tbl.html
http://www.weather.com/glossary/
http://www.crh.noaa.gov/arx/wx.tbl.html
http://www.nws.noaa.gov/om/windchill/index.shtml
http://www.srh.noaa.gov/fwd/heatindex/heat5.html
http://iwin.nws.noaa.gov/iwin/%s/zone.html
http://iwin.nws.noaa.gov/iwin/%s/state.html
http://weather.noaa.gov/pub/data/forecasts/zone/%s/%s.txt
http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s
http://www.metoffice.gov.uk/weather/europe/uk/%s.html
http://ssd.jpl.nasa.gov/elem_planets.html
http://image.weather.com/web/radar/us_%s_closeradar_medium_usen.jpg

BTW, I failed the mentioned that I found two other airports which are nearer to your home town, but one is in Denmark (so I thought you may not want it :)). The other you may want to try as it seems very close to Helsingborg. It is Landskrona, coordinates 55° 56' 40N 12° 52' 10E, code ESML.