Drupal Weather module - getting it local & working

Having just taken on a primary role for running a local group's drupal website I have been looking to add a local weather forecast. After checking available modules it looked like the imaginatively named 'Weather' module (https://www.drupal.org/project/weather) looked like the best balance of features & being actively maintained.

Very easily installed, its quick to get going but a little more involved to get it as I wanted:

My requirement is simple - to have a forecast available on the front page for a specific location, West Ealing, where the local group is based.

1. Getting the location:

Whilst the module has many many locations, the one I wanted was not there. The website/service they use for the actual data (yr.no) has West Ealing. It's just not one of the prepared locations in the Weather module.

A bit of investigation shows that the offered locations are all contained in the WEATHER_PLACES table. Each row contains a lat/long, country, location name and a link to the source yr.no data. This information can be found by going to the yr.no website, entering the location in the search box and then observing the resulting URL and the contents of the link marked 'Værkart'. I simply added a row to the table. SQL I used is here:

INSERT INTO `weather_places` VALUES ('geonames_7302137',51.51075,-0.3196,'United Kingdom','West Ealing','England/West_Ealing');

(There are probably other ways to achieve this without having to manually insert data, but this was the method I've used so far)

2. Getting the default display

Configure the Weather module (Admin/Modules/Weather). Set a Default Display (what data & units to use) then add a location to the display. The location added above should be now available in the available list. The 'displayed name for the selected place' seems to be just that -- simply displayed, so I changed mine to be even more specific - my point is this doesn't seem to affect the location used for the forecast source. NOTE- I found that the value of the 'displayed name' field NEVER saves on first completion of the form. but go back into this 'location' on the main Weather module page and it will save. Odd!

3. Add a block to the home page

In the blocks config page (Admin/Structure/Blocks), find the block "Weather: system-wide display (#1)" and move it to whatever region you want.


The module retrieves and then caches weather data. I've found that clearing down the tables WEATHER_FORECASTS and WEATHER_FORECAST_INFORMATION have been needed sometimes if I've been changing things, especially trying to get the custom location working.

The module uses pre-defined images/icons to display the weather forecast. These are mostly delivered with the Weather module install but it seems some new ones are referenced by the metadata that are not yet in the module. Error messages like the following indicate missing images:

Warning: getimagesize(sites/all/modules/weather/images/46.png): failed to open stream: No such file or directory in weather_format_image() (line 182 of /home/site/public_html/DEV/sites/all/modules/weather/weather_theme.inc).

Missing ones can probably be found here (http://om.yr.no/forklaring/symbol/) and can be downloaded to the sites' files directory (or an alternative is specified in the module config's "Directory for custom images" setting.