Ubuntu

Weather calendar getting wrong data

Asked by jullman on 2007-05-30

When adding a weather calendar for Blythe, California, the wrong data is being fetched. The data being fetched is extremely incorrect for Blythe, California and the cache folder being created seems to indicate that it's really getting the data for Salem, Oregon. The folder created is named weather___ccf_SLE_Blythe -- but SLE is the weather station in Salem, Oregon.

Is there a way I can manually correct this so it will fetch data for station BLH, which is Blythe?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu evolution Edit question
Assignee:
No assignee Edit question
Solved by:
Alan Pope ㋛
Solved:
2007-05-31
Last query:
2007-05-31
Last reply:
2007-05-31
Sam Cater (wraund) said : #1

It could be an external problem, and not a problem at your end.

May sound daft if you have already done it. But check the settings and check them again, to make sure nothing could be causing this

jullman (jullman7) said : #2

I've checked everything I can check. I've deleted and recreated the calendar several times, as well as created several other cities. They all seem to work except Blythe, and they all return weather station identifiers that match the city selected, again, except Blythe. And it is definitely getting data for Salem, Oregon - I created a calendar for Salem, and it gets the exact same data.

Do you know where the calendar gets its settings from, as far as which city lines up with which weather station? If it's a local file (though I can't find one) I'll try to edit it myself. If it comes from a remote server someone just has it pointing to the wrong place.

Alan Pope ㋛ (popey) said : #3

Looking at the source for that panel applet it looks like the data is gathered from one of a number of publicly accessed websites. I guess you'd need to see what your city data is there?

alan@mother:~/src/gnome-applets-2.18.0/libgweather$ grep http *
weather-bom.c: url = g_strdup_printf("http://www.bom.gov.au/cgi-bin/wrap_fwo.pl?%s.txt",
weather.c: * http://www.crh.noaa.gov/arx/wx.tbl.html are entered below, except those
weather.c: * etc means, you can go to http://www.weather.com/glossary/ and
weather.c: * http://www.crh.noaa.gov/arx/wx.tbl.html */
weather.c: * http://www.nws.noaa.gov/om/windchill/index.shtml
weather.c: * http://www.srh.noaa.gov/fwd/heatindex/heat5.html
weather-iwin.c: url = g_strdup_printf("http://iwin.nws.noaa.gov/iwin/%s/zone.html",
weather-iwin.c: url = g_strdup_printf("http://iwin.nws.noaa.gov/iwin/%s/state.html",
weather-iwin.c: url = g_strdup_printf ("http://weather.noaa.gov/pub/data/forecasts/zone/%s/%s.txt",
weather-metar.c: url = g_strdup_printf("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", loc->code);
weather-met.c: url = g_strdup_printf("http://www.metoffice.gov.uk/weather/europe/uk/%s.html", loc->zone+1);
weather-sun.c: * Planetary Mean Orbit parameters from http://ssd.jpl.nasa.gov/elem_planets.html,
weather-wx.c: url = g_strdup_printf ("http://image.weather.com/web/radar/us_%s_closeradar_medium_usen.jpg", loc->radar);

I would pick a few of those sites out - especially the US ones (.gov) and see what you get:-

http://iwin.nws.noaa.gov
http://weather.noaa.gov

jullman (jullman7) said : #4

Are you sure there is a relation between the gnome weather applet and the Evolution weather calendar?

My weather applets work fine, including the one for Blythe. It's only the weather calendar in Evolution (that gets the 7 day forecast and automatically puts the forecast onto your calendar), and even there only the one for Blythe, California, that doesn't work correctly.

The only files I can find that apply specifically to the weather calendar feature are at usr/lib/evolution/2.10/plugins. There is a file there named org-gnome-calendar-weather.eplug that points to the only other weather related file there, which is a binary.

Best Alan Pope ㋛ (popey) said : #5

Erk, my apologies, I misread the question and assumed you meant the weather applet.

$ strings /usr/lib/evolution/2.10/plugins/org-gnome-calendar-weather.eplug

Makes reference to the following shared library:- /usr/lib/evolution/2.10/plugins/liborg-gnome-calendar-weather.so

Which if we run strings on:-

$ strings /usr/lib/evolution/2.10/plugins/liborg-gnome-calendar-weather.so

Makes reference to:- /usr/share/evolution-data-server-1.10/weather/Locations.xml

Which if you grep..

$ grep Blythe /usr/share/evolution-data-server-1.10/weather/Locations.xml

 <location type="ccf" code="SLE" url="http://www.crh.noaa.gov/data/PQR/CCFPQR">Blythe</location>

This looks to be the place that Evolution gets the weather data from. If this is incorrect you can test modifying it by backing it up first and then changing it. If it is really incorrect then you could file a bug against Evolution.

https://bugs.launchpad.net/ubuntu/+source/evolution/+bugs

jullman (jullman7) said : #6

That got me a whole lot closer. That's the file I've been looking for.

The station code that it shows - SLE - is what's causing my problem. SLE is Salem, not Blythe. However, changing the station code to BLH causes terrible problems. Evolution won't even start back up after that - even after restoring the original file. I had to wipe out my entire personal settings folder (with all of its calendar data) to get it to restart.

So, off to file a bug report, I guess.

Thanks.

Cesare Tirabassi (norsetto) said : #7

I guess if you change the code to BLH you also need to change the url to http://www.crh.noaa.gov/data/PSR/CCFPSR.

jullman (jullman7) said : #8

Thanks Alan Pope, that solved my question.

jullman (jullman7) said : #9

Ceasre, I found the correct url a little while ago and edited the file again. This time it didn't corrupt on my and now it finally gets the correct data.

Thanks everyone.

Alan Pope ㋛ (popey) said : #10

Hurrah!

Yay us!

Craig Snively (craigsn) said : #11

I apologize for jumping in here, but in my calendar tab, there is a "Weather" label, along with my contacts an "on this computer" link. What does this do, where do I change it? Hopefully there is a doc page that describes it.

Ian Weisser (ian-weisser) said : #12

Still not fixed upstream.

Submitted a corrected Locations.xml file to http://bugzilla.gnome.org/show_bug.cgi?id=451734

Ian Weisser (ian-weisser) said : #13

Fix accepted by Gnome