Skip to content
Snippets Groups Projects
Commit 1140a190 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Adding TM as fallback for missing TX

parent 01c1ef0a
No related branches found
No related tags found
No related merge requests found
Pipeline #128 failed
...@@ -436,7 +436,10 @@ public class BremiaLactucaeModel extends I18nImpl implements Model { ...@@ -436,7 +436,10 @@ public class BremiaLactucaeModel extends I18nImpl implements Model {
Calendar cal = Calendar.getInstance(this.timeZone); Calendar cal = Calendar.getInstance(this.timeZone);
while(startTime.compareTo(endTime) <= 0) while(startTime.compareTo(endTime) <= 0)
{ {
Double txHour = this.dataMatrix.getParamDoubleValueForDate(startTime, DataMatrix.TX); // Using TM as fallback for TX
Double txHour = this.dataMatrix.getParamValueForDate(startTime, DataMatrix.TX) != null ?
this.dataMatrix.getParamDoubleValueForDate(startTime, DataMatrix.TX)
: this.dataMatrix.getParamDoubleValueForDate(startTime, DataMatrix.TM);
maxTemp = Math.max(maxTemp, txHour); maxTemp = Math.max(maxTemp, txHour);
cal.setTime(startTime); cal.setTime(startTime);
cal.add(Calendar.HOUR_OF_DAY, 1); cal.add(Calendar.HOUR_OF_DAY, 1);
......
...@@ -52,6 +52,11 @@ public class DataMatrix extends DateMap{ ...@@ -52,6 +52,11 @@ public class DataMatrix extends DateMap{
*/ */
public final static String TX = "TX"; public final static String TX = "TX";
/**
* Mean temp hourly
*/
public final static String TM = "TM";
/** /**
* Enough relative humidity last night? (Rule #5) 1 or 0 * Enough relative humidity last night? (Rule #5) 1 or 0
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment