Murry Conarroe of Wildwood Weather (
http://weather.wildwoodnaturist.com/) has graciously developed a nice script to calculate the "Year to Date" and "Month to Date" rainfall differential (departure from average) totals that utilizes the dailynoaareport files created by Weather Display. The script will update these differential totals on a daily basis and utilize your entire historical data archive.
See my dashboard under the Rain section (note the MTD Differential and the YTD Differential)
http://www.relayweather.com/Additionally, I've added the differentials in my "Rain Trending" page at the bottom of the main table:
http://www.relayweather.com/wxraintrending.phpTo use the script, download the raintodate.php file (there are a couple of adjustable settings at the top) and add the following line to your dashboard file.
include_once('raintodate.php'); // for ytd/mtd rain calculations
It needs to be somewhere after the
"include_once($WXtags); // for the bulk of our data"
line to ensure that the variables in the testtags.php file are available.
The two variables created by the raintodate.php file that you can use anywhere in the dashboard are $avg_ytd_rain and $avg_mtd_rain.
I know that this has been a desirable variable that many of us want! Many thanks to Murry!
