org.n52.operation.cropmodeling
Class TemperatureModelAlgorithm
java.lang.Object
org.n52.operation.cropmodeling.TemperatureModelAlgorithm
- All Implemented Interfaces:
- AlgorithmN, AlgorithmOnValues
public class TemperatureModelAlgorithm
- extends java.lang.Object
- implements AlgorithmOnValues
Algorithm to calculate assimilation values
The algorithm works on a timeseries temperature values; it needs time-temperature
value pairs and the latitude of the spatial location to correctly perform
the calculation
- Author:
- Willem Nieuwenhuis
Field Summary |
protected java.util.Calendar |
cal
TemperatureModelAlgorithm cal field |
Method Summary |
double[] |
calculate(double[] temperatures)
Calculates the results of the AlgorithmN for the values in params. |
void |
setLatitude(double lat)
|
void |
setResolution(double resolution)
|
void |
setStartTime(int year,
int month,
int day,
int hours,
int minutes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cal
protected java.util.Calendar cal
- TemperatureModelAlgorithm cal field
TemperatureModelAlgorithm
public TemperatureModelAlgorithm()
- constructor
setLatitude
public void setLatitude(double lat)
- Parameters:
lat
- The latitude to set.
setResolution
public void setResolution(double resolution)
- Parameters:
resolution
- The time resolution in minutes to set.
setStartTime
public void setStartTime(int year,
int month,
int day,
int hours,
int minutes)
- Parameters:
year
- month
- day
- hours
- minutes
-
calculate
public double[] calculate(double[] temperatures)
- Description copied from interface:
AlgorithmN
- Calculates the results of the AlgorithmN for the values in params.
- Specified by:
calculate
in interface AlgorithmN
- Returns:
- the result