Global Warming Trend Script

With it being a very cold winter in my area, I was interested in the temperature trends with my collected data over the last 5 years. With this interest, I’ve created a small script to generate the overall trend variable. Of course this is not an indication of the general “global warming” trend but it does indicate the trend in my area over the last year using the averages over the last 5 years. What would be extremely cool is if everyone in the “weather collection” world could contribute this number to the same location to generate a more accurate general trend.

See the output here: http://www.relayweather.com/wxglobalwarming.php

Cheers!
Michael

Download the Script Here: http://www.relayweather.com/downloads.php
Feel free to alter this to add new features, graphics, etc…
If anyone has new ideas, please contribute. :wink:

Update #1 – Murry Conarroe of Decatur, TX, USA http://weather.wildwoodnaturist.com/wxindex.php has added a rain trending version of this script. You can see this in action here: http://www.relayweather.com/wxraintrending.php and also at Murry’s site: http://weather.wildwoodnaturist.com/wxraintemptrends.php
The rain trend chart is available in the same download above.

Update #2 – Murry Conarroe of Decatur, TX, USA has graciously added functionality so that the script performs better at the beginning of the month. Currently, 12 month calculation omits the remaining days of each current month which “skews” the averaging. The value displayed in the current month column (i.e. Feb 2010) will continue to use the customtag value as that is the correct month to date average. But for the 12 month calculation, the value will use the dailynoaareport22009.htm for the current day to the end of the month and the dailynoaareport.htm for the days before current day. If the dailynoaareport22009 file is not found, the customtag value will be used as the month average. If it is found but the dailynoaareport is not, the customtag value will be used for the beginning portion of the month. The updated file can be downloaded at the link above.

I would be interested in the code. Not because of global warming…

Just a nice piece of code…

Wow,
it’s very cool.
I’m very interested
Best regards,

Alessandro

Thats great work on that Michael.

I wouldnt mind adding that.

Hi,

Looks very nice, I would be very interested in using the code.

John

All,

Thanks for the compliments. Download is on the bottom of the first post. Please feel free to build upon the current script and share with others… :slight_smile: :wink: Maybe a graphic for the menubar or something similar?? :lol:

Michael

Every time I look through the new threads on here I find more interesting stuff I’d like to include on my web site, this is another really nice example and yes I’d like to use the code. Just wish I was knowledable enough to come up with my own ideas!!
Phil

I’ve been curious about the temp trend for a while now, with others help in learning a bit of php around here, I’m experienced enough to be dangerous! :lol:

Hi Michael,
i have an error on line 68.
Here is the link: http://www.meteocarmignano.it/wxglobalwarming.php
Could you give me an eye please?
Many thanks,

Alessandro

Edit: That problem persisted also after the installation of new tags.

hi
I seem to have the same or similar error

January Fatal error: Call to undefined function strip_units() in /home/.sites/150/site462/web/wxglobalwarming.php on line 67

Thanks… Works good…

Nice script Michael.

http://www.chucksweather.com/wxglobalwarming.php

Chuck

Thanks for sharing.

Alesssandro,
You can remove all instances of “strip_units” from the script as I now realize that this is not needed or you can redownload the script again. (I’ve removed this function from the file in the download)

Michael

You can remove all instances of “strip_units” from the script as I now realize that this is not needed or you can redownload the script again. (I’ve removed this function from the file in the download)

Michael

I also have the troubles and when I deleted “strip_units” it gave an error on the next command “gen_difference”. Also the “Current Monthly Avg” only has “F” and no temp.
http://www.cavecountryweather.com/wxglobalwarming.php

Nice script Michael!

Did the script function before you deleted the “strip_units”?

Very nice. This will make a nice addition to the wxtempdetail pg.

I’ll incorporate tomorrow and probably call the combination “Local Climatolog”.

No. it had the same faults as already mentioned. It looks like “strip_units” is referencing some php code that I don’t have?