Blackdown Hills Weather

Source Code Snippets

Gauges.py
In response to requests to see the source code and particularly how I produced the gauges,
here is the current version of Gauges.py.  Click on the link to see the code.

Gauges.py also produces the Banner which I use on message boards and displayed on Home Page,
and estimates the best "norm" for the wind direction and selects an appropriate graph.

It uses ImageMagick and Gnuplot to produce images, tabular data and graphs. 
These are invoked by creating a script file in Python and passing this to ImageMagic or Gnuplot.

Please note that this is NOT final and requires some tidying up and a couple of things sorting out.
As this module does more than just the gauges, it may be split up later for clarity. 
I intend to add more documentation within the code to make useage clearer.

Code posted on pywws Google Group - 16 January 2010

Having produced a Gauges page for my weather station web site with Air
Temperature and Dew Point, I came to the conclusion the Dew Point wasn't
really very useful to most people and that "Real Feel" or "Feels Like"
would be better - taking temperature, humidity and wind speed into
account.

So following on from this discussion, I have taken the Australian calculation
of Apparent Temperature and added it to my software.

So in WeatherStation.py I have added :-
<code>
def apparent_temp(temp, rh, wind):
    """Compute apparent temperature (real feel), using formula from
    http://www.bom.gov.au/info/thermal_stress/"""
    vap_press = rh / 100.0 * 6.105 * math.exp(17.27 * temp / (237.7 + temp))
    AT = temp + 0.33 * vap_press - 0.70 * wind - 4.00
    return AT
</code>

This can also be used to produce an extra graph in the same way as Wind
Chill was used in the earlier post (quoted below).

I hope others may find this useful.

Regards
Gina
Weather website :- http://ginad.org.uk/weather/

On Sat, 2010-01-16 at 09:55 +0000,
Web Page Under Construction
Page created  6 August 2010 - updated 15 August 2010