Page 1 of 1

Monthly Climate Chart

Posted: Tue Jul 31, 2018 6:45 pm
by nineback
Take a look at this page:

http://www.kq5s.com/template/pages/stat ... ndices.php

Along the left side it shows the various statistics being monitored. If you look at them the criteria is obviously off. The parameter for frost is temp < 90 degrees. Summer days has a temp >171 degrees.

I believe the data being displayed is correct just not the criteria in the left most column.

I looked at a couple of other template websites and see the same thing.

Tom

Re: Monthly Climate Chart

Posted: Tue Jul 31, 2018 8:59 pm
by wx_jon
I hadn't noticed that one before. It's a unit conversion issue, and can be fixed by replacing lines 353-361 of climateIndices.php with

Code: Select all

	function doConv($number){
		global $dataTempUnits;
		global $displayTempUnits;
		return number_format(convertor($number,$dataTempUnits,$displayTempUnits),0,".","");
	}

Re: Monthly Climate Chart

Posted: Tue Jul 31, 2018 9:34 pm
by wx_jon
By the way, this fixes the display on the left, but there are issues with conversion of the data values when the data units and display units are not the same. I fixed mine, but Jachym, you'll need to add some calls to `convertor` when displaying the data.

Re: Monthly Climate Chart

Posted: Tue Jul 31, 2018 10:55 pm
by nineback
Thanks. I made the changes and all seems well. Not sure about "there are issues with conversion of the data values". My values appear to be correct after I made the change. What I did notice I am missing the First Frost date and time for 2018. The Last Date is showing.

Thanks again.

Tom

Re: Monthly Climate Chart

Posted: Wed Aug 01, 2018 7:00 pm
by wx_jon
If you change your units to ºC on the webpage, you'll still see all the temperatures in ºF - except for the ones in the left column!

Re: Monthly Climate Chart

Posted: Wed Aug 01, 2018 11:12 pm
by nineback
Ah. I did not try changing units.
Thanks again for the quick fix.

Tom