//--------------------------------------------------------------------------- protected double calcDayLength(double latitudeRadians, double solarDecRadians) { sunsetAngle = new Angle(Math.Acos(-1 * Math.Tan(latitudeRadians) * Math.Tan(solarDecRadians)), AngleType.Rad); return((sunsetAngle.deg / 15) * 2); }
//----------------------------------------------------------------------- protected void InitArrays() { LeafAngles = new Angle[_nLayers]; LAIs = new double[_nLayers]; LAIAccums = new double[_nLayers]; BeamPenetrations = new double[_nLayers]; SunlitLAIs = new double[_nLayers]; ShadedLAIs = new double[_nLayers]; ShadowProjectionCoeffs = new double[_nLayers]; BeamExtCoeffs = new double[_nLayers]; BeamScatteredBeams = new double[_nLayers]; DiffuseExtCoeffs = new double[_nLayers]; DiffuseScatteredDiffuses = new double[_nLayers]; LeafReflectionCoeffs = new double[_nLayers]; LeafTransmissivitys = new double[_nLayers]; ReflectionCoefficientHorizontals = new double[_nLayers]; BeamReflectionCoeffs = new double[_nLayers]; DiffuseReflectionCoeffs = new double[_nLayers]; LeafScatteringCoeffs = new double[_nLayers]; PropnInterceptedRadns = new double[_nLayers]; PropnInterceptedRadnsAccum = new double[_nLayers]; AbsorbedRadiation = new double[_nLayers]; BeamExtCoeffsNIR = new double[_nLayers]; BeamScatteredBeamsNIR = new double[_nLayers]; DiffuseExtCoeffsNIR = new double[_nLayers]; DiffuseScatteredDiffusesNIR = new double[_nLayers]; ReflectionCoefficientHorizontalsNIR = new double[_nLayers]; BeamReflectionCoeffsNIR = new double[_nLayers]; DiffuseReflectionCoeffsNIR = new double[_nLayers]; LeafScatteringCoeffsNIR = new double[_nLayers]; AbsorbedRadiationNIR = new double[_nLayers]; AbsorbedRadiationPAR = new double[_nLayers]; Us = new double[_nLayers]; Rb_Hs = new double[_nLayers]; Rb_H2Os = new double[_nLayers]; Rb_CO2s = new double[_nLayers]; Rts = new double[_nLayers]; Rb_H_LAIs = new double[_nLayers]; Rb_H2O_LAIs = new double[_nLayers]; //boundryLayerConductance = new double[_nLayers]; Ac = new double[_nLayers]; Acgross = new double[_nLayers]; BiomassC = new double[_nLayers]; //Nitrogen variables LeafNs = new double[_nLayers]; VcMax25 = new double[_nLayers]; J2Max25 = new double[_nLayers]; JMax25 = new double[_nLayers]; Rd25 = new double[_nLayers]; VpMax25 = new double[_nLayers]; Gm25 = new double[_nLayers]; LeafWidths = new double[_nLayers]; Gbh = new double[_nLayers]; LAI = LAI; LeafNTopCanopy = LeafNTopCanopy; LeafAngle = LeafAngle; LeafReflectionCoeff = LeafReflectionCoeff; LeafTransmissivity = LeafTransmissivity; DiffuseExtCoeff = DiffuseExtCoeff; DiffuseReflectionCoeff = DiffuseReflectionCoeff; LeafWidth = LeafWidth; DiffuseScatteredDiffuse = DiffuseScatteredDiffuse; }