Finally a Perl Mod for Canadians

Well I finally found a Perl mod that was just made for us Canadians (and maybe the Fennoscandias as well). Well when you live where you have snow on the ground at sea level for 6 months of the year and you can get snow 9 months out of a possible 12 this mod is a good one to have around.

I am talking about 'Temperature::Windchill' or how cold does exposed skin feel when there is a wind out-side.

Well if you are like me and spend any time outdoors in a Canadian winter you pay attention to such things as it really could mean your life or death at worse or a least a crappy day in the woods or a good day.

So I was happy to see it as it could be a neat add into any outdoors web site.

Now there was a change some 13 years ago where we here in Canada and US actually changed the way we calculated wind chill, and no it had nothing to do with the fact that humans are bags of salt water and the original calculations where done with a pail of fresh water hung from a 10m pole.

It has more to do with the height at which the wind is measured which is a standard 10m. Now there are very few people, who are over 2.5 m tall, except perhaps most of the Dutch, so the new calculation has a fudge factor from that 10m height down to a 1.52m person or about face level, as well other factors were add in including, for the first time, data from human volunteers.

Wind chill has decreased since I was a kid, as my kid likes to say as it really wasn't that cold when I walked to school, unless you are Dutch then you can take away another .5c because the extra height.

However, it is much more accurate as I find that dressing for the new scale I feel warmer than with the old scale. Mind you it could also be the extra 15kg of blubber I have put on since I was a kid?

Well Using this mode couldn't be simpler here is an example


Use Temperature::Windchill ('windchill_si');
my $wc = windchill_si(-25,30);
print $wc;

-39.09

Being a good programmer I did have a look under the hood and discovers that it is not 100% accurate at least not in Canada as we have an extended formula when dealing with low wind situations.

Our wind chill goes below 5 kmph (as does the US now as I discovered) so for lets say warm and calm conditions like this


Use Temperature::Windchill ('windchill_si');
my $wc = windchill_si(1,1);
print $wc;

2.768


We should get 1 or 0 depending on your rounding not a value higher than the ambient temperature!

To be fair he does state in the Pod

WCT is only defined for wind speeds above 3 MPH (4.8 KPH) and below 110 MPH (177 KPH).

So I can let that go.

But I think a patch is in order if I am going to use this on a Canadian Web site.

Now for those of you who don't really care but still want something from this here is funny cat picture for you.

POOR KITTY IN THE SNOW.JPG

3 Comments

Being both a Canadian and being of 50% Dutch stock, I can really appreciate your post. I'm almost 6 feet tall, but at a family event, I'm the really short guy.

Typo in the title... (or maybe a pun I don't get)

Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations