net.simplace.client.simulation.lap.transformer.DiurnalSineWeatherTransformer

Transforms daily radiation and temperature to diurnal values using sine curves.

Temperature follows a sine curve during daylight and an exponential decay curve during night between minimum and maximum temperature.

Radiation follows either a simple sine curve, or a shifted sine curve (SinBeta) as defined by (G).

Input variables

Output variables

Output variables in the following order

Temperature

Temperature is calculated according to (G) eq. 3.9 for daytime

\(12-d/2 < t_h < 12+d/2\): \[ T_a(t_h) =T_{min} + (T_{max} + T_{min})\sin(\pi \frac{t_h - 12 + \frac{d}{2}}{d + 2p}) \]

and (G) eq. 3.10 for nighttime

\(t_h \leq 12-d/2 \quad\text{or}\quad 12+d/2 \leq t_h\): \[ T_a(t_h) = \frac{T_{min}-T_{sset} e^{-\frac{n}{TC}} + (T_{sset}-T_{min})e^{-\frac{t_h - t_{sset}}{TC}}}{1-e^{-\frac{n}{TC}}} \] where \(T_a\) is the air temperature at hour \(t_h\), \(d, n\) are day- and nightlength, \(p\) is the offset from noon of max temperature and \(TC\) the nocturnal time coefficient. \(T_{sset}, t_{sset}\) are temperature and time at sunsset.

Radiation

If RadiationCurve has the value 'Sine', then the radiation intensitiy follows the curve

\[ I(t) \propto s(t) = \sin(\frac{\pi}{d} (t - (12-\frac{d}{2}))) \]

If it has the value SinBeta the curve (G), eq. 3.2 is used:

\[ I(t) \propto sin\beta(t) = a + b\cos(2\pi \frac{t - 12}{24}) \] where parameters \(a,b\) depend on latitude and daylength. Diurnal Radiation at a timestep \(t_i\) is the radiation accumulated between the previous and actual timestep. \[ R(t_i) = \int_{t_{i-1}}^{t_i}I(t)dt \]

References

(G) Goudriaan, Modeling Potential Crop Growth Processes, 1994, (revised version Nov. 2004)




public class DiurnalSineWeatherTransformer extends
net.simplace.simulation.io.resources.FWSimResourceTransformer {
// Public Constructors
public DiurnalSineWeatherTransformer(FWSimSession aSession, Element
aResourceElement, Integer aOrderNumber);
public DiurnalSineWeatherTransformer(FWSimSession aSession, Integer
aOrderNumber);


// Public Instance Methods
public HashMap createVariables(); // Defines
net.simplace.simulation.io.FWSimIOAdapter


public FWSimResourceCache getData(FWSimVarMap aVarMap)
throws MissingSimResourceException; // Defines
net.simplace.simulation.io.resources.FWSimInputAdapter


standard method from outside
public FWSimResourceCache getData(FWSimVarMap aVarMap, FWSimResourceCache
aResourceCache) throws MissingSimResourceException;

used by test cases
returns delivered new data from transformer
public FWSimResourceCache calculateDiurnalValues(int aSteps, double latitude,
double timeOffset, double timeCoefficient, String radiationCurve, String
DateField, String MinTempField, String MaxTempField, String
RadiationField, String aProjectID, FWSimResourceCache aCache)
throws MissingSimResourceException;

Calculates Daylengths
returns the new created {@link FWSimResourceCache}
public void updateFields(FWObservable aObservable);
// Defines
net.simplace.simulation.io.resources.FWSimResourceTransformer




}



Hierarchy: java.lang.Object - net.simplace.simulation.io.FWSimIOAdapter (net.simplace.simulation.util.FWSimFieldContainer) - net.simplace.simulation.io.resources.FWSimInputAdapter - net.simplace.simulation.io.resources.FWSimResourceTransformer - DiurnalSineWeatherTransformer