org.n52.operation.cropmodeling
Class CropAssimilationAlgorithm

java.lang.Object
  extended by org.n52.operation.cropmodeling.CropAssimilationAlgorithm
All Implemented Interfaces:
AlgorithmN, AlgorithmOnValues

public class CropAssimilationAlgorithm
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
 
Constructor Summary
CropAssimilationAlgorithm()
          constructor
 
Method Summary
 double[] calculate(double[] temperatures)
          Calculates the results of the AlgorithmN for the values in params.
 void setCropdataFile(java.lang.String cropdataFile)
          Specify the file to be used for the cropdata parameter file
 void setCropType(java.lang.String cropType)
          Specify the crop type to use
 void setLatitude(double lat)
           
 void setResolution(double resolution)
           
 void setStartTime(int year, int month, int day, int hours, int minutes)
           
 void setTemperatureModel(TemperatureModelAlgorithm tempo)
          Specify the temperature model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cal

protected java.util.Calendar cal
TemperatureModelAlgorithm cal field

Constructor Detail

CropAssimilationAlgorithm

public CropAssimilationAlgorithm()
constructor

Method Detail

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 -

setCropdataFile

public void setCropdataFile(java.lang.String cropdataFile)
Specify the file to be used for the cropdata parameter file

Parameters:
cropdataFile - cropdata parameter filename

setCropType

public void setCropType(java.lang.String cropType)
Specify the crop type to use

Parameters:
cropType -

setTemperatureModel

public void setTemperatureModel(TemperatureModelAlgorithm tempo)
Specify the temperature model

Parameters:
tempo - temperature model

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