Freeze Data Readme

This script is designed as an add-on page for the PHP templates available from Saratoga Weather. It uses the NOAA Reports created and uploaded to your website by your weather software program to display the first and last freeze dates, number of days where the minumum and maximum tempertures were at or below freezing, and the most consecutive days at or below freezing for each year. It also displays the average, earliest, and latest dates of first and last freezes for all years for which you have data. For those in the Northern Hemisphere, a year is from July 1 to June 30.

It is strongly recommended that you have a minimum of one full year of data for best results.

Due to not having psychic ability to determine if a freeze is the last one for that year, the Last Freeze column for the current year will not be updated until the the latest freeze of any year for which you have data. For example, if the latest freeze of any of the previous years of your data is April 17, the lastest freeze column for the current year will not be updated until April 17 of the current year.

Requirements:

  • You need to be uploading the NOAA report files to your website.
  • PHP5 on your website

The only settings you should typically need to change is the $start_year in the settings section of the wxfreeze.php file. Set to the first year of NOAA reports that you have. If you did not start recording data until after the first freeze of the year, you should increase the $start_year setting by one. For example, if your first NOAA report is for December 2010 and you have already had freezes earlier that year, you should set $start_year to 2011 instead of 2010 to avoid skewing the results.

If you have missing or incorrect data in your NOAA Reports files and cannot or do not wish to add/correct the data in in your weather software, you can manually provide the data in a csv file. Open the sample wxreportsmmyyyy.csv file included in the zip download in a spreadsheet. Enter the necessary data in the appropriate column. You only need to add data for the values you wish to add or correct. Do not make any changes to the header row. Save the updated file as wxreportmmyyyy.csv where mm is the month number (2 characters) and yyyy is the year (i.e. wxreports062012.csv for June 2012). Upload to the same folder where the NOAA reports are located. If you have bad data for an item but do not know what the correct value should be, you can enter a 'D' (without the quote marks) for that item and day and the scripts will ignore the data for that day.

If you are not using the Saratoga template, you can use the script in standalone mode by creating a file in the same folder as the wxfreeze script. The file must be named nonsaratogatemplate.txt. The content of the file does not matter. Just that it exists. You also need to upload the nonSaratogatemplate-settings.php and modify the settings in that file as needed.

VERSION History:

  • 1.2 - Jan 9, 2015 - Added Column for most consecutive days with low temp below freezing.