DEFINITION MODULE EDepTOth; (******************************************************************* Module EDepTOth (Version 1.0) Copyright (c) 1992 by Heike Lischke and Swiss Federal Institute of Technology ZŸrich ETHZ References to equations, figures and tables in the comments refer to: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Lischke, H., Loeffler, T.J., Fischlin, A.: Calculating temperature dependence over long time periods: Derivation of methods. Ecol. Modelling, in press. PLEASE cite this paper when you use these algorithms! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Version written for: MacMETH_V3.2 (1-Pass Modula-2 implementation) Purpose (*. purpose .*) Remarks (*. remarks. .*) Programming o Design H. Lischke 6/8/93 o Implementation H. Lischke 6/8/93 Swiss Federal Institute of Technology Zurich ETHZ CH-8092 Zurich Switzerland Last revision of definition: 6/8/93 HL *******************************************************************) TYPE whichDayOfDataset=(first,middle,last); (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) (* Dependence function value (dep) : *) (* DepFunc *) (* Calculates value of piece wise linear approximation of *) (* dependence function *) (* Input: *) (* temp: current temperature value *) (* idmax: number of grid points of dep. func. *) (* approximation *) (* threshold: x-(Temp.)-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* tempabAtThreshold: y-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* Output: *) (* DepFunc: dep. func value *) (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) PROCEDURE DepFunc( temp:REAL; idmax:INTEGER; threshold,tempabAtThreshold: ARRAY OF REAL):REAL; (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) (*Error function value : *) (* ErrorFunction *) (* Calculates by series expansion value of error function, *) (* i.e. *) (* Erf()= 2/sqrt(Pi) integral from 0 to x over e^(-t^2) dt *) (* Input: *) (* x: upper integral boundary *) (* Output: *) (* ErrorFunction: error func value *) (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) PROCEDURE ErrorFunction( x:REAL ):REAL; (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) (* Methods EDH and EDM : *) (* EofDepofTmeanSigma *) (* Calculates expected value of piece wise linear dependence*) (* function explicitly *) (* *) (* Input: *) (* mue: temperature mean *) (* s : temperature standard deviation *) (* idmax: number of grid points of dep. func. *) (* approximation *) (* threshold: x-(Temp.)-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* tempabAtThreshold: y-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* Output: *) (* EofDepofTmeanSigma: expected value *) (* *) (* EDH: mue and s of hourly temperatures *) (* EDM: mue and s of daily mean temperatures *) (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) PROCEDURE EofDepofTmeanSigma( mue,s: REAL; idmax:INTEGER; threshold,tempabAtThreshold: ARRAY OF REAL):REAL; (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) (* Methods EDHT1 and EDHT2 : *) (* EofDepofTmeanSigmaParAppro *) (* Calculates expected value of piece wise linear dependence*) (* function using average temperature and standard *) (* deviation which are estimated from mean and variance *) (* of daily mean and amplitude *) (* *) (* Input: *) (* mueTb: temperature mean *) (* sTb : standard deviation of daily means *) (* mueAmpl: mean of daily amplitudes *) (* sAmpl: standard deviation of daily amplitudes *) (* idmax: number of grid points of dep. func. *) (* approximation *) (* threshold: x-(Temp.)-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* tempabAtThreshold: y-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* Output: *) (* EofDepofTmeanSigmaParAppro: expected value *) (* *) (* EDHT1: recorded mueTb *) (* EDH: mueTb reconstructed from Tmin and *) (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) PROCEDURE EofDepofTmeanSigmaParAppro ( mueTb,sTb,mueAmpl,sAmpl: REAL; idmax:INTEGER; threshold,tempabAtThreshold: ARRAY OF REAL):REAL; (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) (* Method DAT : *) (* DepFuncTmeanAmpl *) (* Calculates dependence function of mean daily triangle *) (* *) (* Input: *) (* avtemp: temperature mean *) (* ampl : mean temperature amplitude *) (* idmax: number of grid points of dep. func. *) (* approximation *) (* threshold: x-(Temp.)-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* tempabAtThreshold: y-values of grid points of dep. *) (* function approximation [0..idma-1] *) (* Output: *) (* DepFuncTmeanAmpl:dep. funct. of mean daily triangle *) (* *) (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) PROCEDURE DepFuncTmeanAmpl( avtemp ,ampl:REAL; idmax:INTEGER; threshold,tempabAtThreshold: ARRAY OF REAL):REAL; (*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*) END EDepTOth.