Monthly Climate Chart

Post Reply
nineback
Advisor
Advisor
Posts: 74
Joined: Thu Aug 24, 2017 11:12 am
Location: Alabama
Station model: Davis Pro2
Software: WeeWX
Contact:

Monthly Climate Chart

Post by nineback » Tue Jul 31, 2018 6:45 pm

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

wx_jon
Advisor
Advisor
Posts: 52
Joined: Tue Aug 29, 2017 8:54 pm
Location: Seattle, WA, USA
Station model: Davis Vantage Pro 2 Plus
Software: weeWX
Contact:

Re: Monthly Climate Chart

Post by wx_jon » Tue Jul 31, 2018 8:59 pm

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,".","");
	}

wx_jon
Advisor
Advisor
Posts: 52
Joined: Tue Aug 29, 2017 8:54 pm
Location: Seattle, WA, USA
Station model: Davis Vantage Pro 2 Plus
Software: weeWX
Contact:

Re: Monthly Climate Chart

Post by wx_jon » Tue Jul 31, 2018 9:34 pm

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.

nineback
Advisor
Advisor
Posts: 74
Joined: Thu Aug 24, 2017 11:12 am
Location: Alabama
Station model: Davis Pro2
Software: WeeWX
Contact:

Re: Monthly Climate Chart

Post by nineback » Tue Jul 31, 2018 10:55 pm

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

wx_jon
Advisor
Advisor
Posts: 52
Joined: Tue Aug 29, 2017 8:54 pm
Location: Seattle, WA, USA
Station model: Davis Vantage Pro 2 Plus
Software: weeWX
Contact:

Re: Monthly Climate Chart

Post by wx_jon » Wed Aug 01, 2018 7:00 pm

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!

nineback
Advisor
Advisor
Posts: 74
Joined: Thu Aug 24, 2017 11:12 am
Location: Alabama
Station model: Davis Pro2
Software: WeeWX
Contact:

Re: Monthly Climate Chart

Post by nineback » Wed Aug 01, 2018 11:12 pm

Ah. I did not try changing units.
Thanks again for the quick fix.

Tom

Post Reply