public override void ReduceExpansionFactors(OrganonStand stand, OrganonStandDensity densityBeforeGrowth, Trees trees, float fertilizationExponent) { // SMC MORTALITY float B0; float B1; float B2; float B3; float B4; float B5; float siteIndex = stand.SiteIndex; switch (trees.Species) { // Hann, Marshall, and Hanus(2006) FRL Research Contribution 49 case FiaCode.PseudotsugaMenziesii: B0 = -3.12161659F; B1 = -0.44724396F; B2 = 0.0F; B3 = -2.48387172F; B4 = 0.01843137F; B5 = 0.01353918F; break; // Unpublished Equation on File at OSU Dept.Forest Resources case FiaCode.AbiesGrandis: B0 = -7.60159F; B1 = -0.200523F; B2 = 0.0F; B3 = 0.0F; B4 = 0.0441333F; B5 = 0.00063849F; break; // Hann, Marshall, Hanus(2003) FRL Research Contribution 40 case FiaCode.TsugaHeterophylla: case FiaCode.ThujaPlicata: B0 = -0.761609F; B1 = -0.529366F; B2 = 0.0F; B3 = -4.74019F; B4 = 0.0119587F; B5 = 0.00756365F; siteIndex = stand.HemlockSiteIndex; // BUGBUG: why does redcedar get hemlock site index only here? break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.TaxusBrevifolia: B0 = -4.072781265F; B1 = -0.176433475F; B2 = 0.0F; B3 = -1.729453975F; B4 = 0.0F; B5 = 0.012525642F; break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.ArbutusMenziesii: B0 = -6.089598985F; B1 = -0.245615070F; B2 = 0.0F; B3 = -3.208265570F; B4 = 0.033348079F; B5 = 0.013571319F; break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.AcerMacrophyllum: B0 = -2.976822456F; B1 = 0.0F; B2 = 0.0F; B3 = -6.223250962F; B4 = 0.0F; B5 = 0.0F; break; // Gould, Marshall, and Harrington(2008) West.J.Appl.For. 23: 26-33 case FiaCode.QuercusGarryana: B0 = -6.00031085F; B1 = -0.10490823F; B2 = 0.0F; B3 = -0.99541909F; B4 = 0.00912739F; B5 = 0.87115652F; break; // best guess case FiaCode.AlnusRubra: B0 = -2.0F; B1 = -0.5F; B2 = 0.015F; B3 = -3.0F; B4 = 0.015F; B5 = 0.01F; break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.CornusNuttallii: B0 = -3.020345211F; B1 = 0.0F; B2 = 0.0F; B3 = -8.467882343F; B4 = 0.013966388F; B5 = 0.009461545F; break; // buest guess case FiaCode.Salix: B0 = -1.386294361F; B1 = 0.0F; B2 = 0.0F; B3 = 0.0F; B4 = 0.0F; B5 = 0.0F; break; default: throw Trees.CreateUnhandledSpeciesException(trees.Species); } float[]? mortalityKforRedAlder = null; if (trees.Species == FiaCode.AlnusRubra) { mortalityKforRedAlder = new float[trees.Capacity]; } for (int treeIndex = 0; treeIndex < trees.Count; ++treeIndex) { if (trees.LiveExpansionFactor[treeIndex] <= 0.0F) { continue; } float dbhInInches = trees.Dbh[treeIndex]; float basalAreaLarger = densityBeforeGrowth.GetBasalAreaLarger(dbhInInches); if (trees.Species == FiaCode.AbiesGrandis) { basalAreaLarger /= dbhInInches; } else if (trees.Species == FiaCode.QuercusGarryana) { basalAreaLarger = MathV.Ln(basalAreaLarger + 5.0F); } float crownRatio = trees.CrownRatio[treeIndex]; float PMK = B0 + B1 * dbhInInches + B2 * dbhInInches * dbhInInches + B3 * crownRatio + B4 * siteIndex + B5 * basalAreaLarger + fertilizationExponent; if (trees.Species == FiaCode.AlnusRubra) { mortalityKforRedAlder ![treeIndex] = PMK;
public override void GrowDiameter(Trees trees, float growthMultiplier, float siteIndexFromDbh, OrganonStandDensity densityBeforeGrowth) { float B0; float B1; float B2; float B3; float B4; float B5; float B6; float K1; float K2; float K3; float K4; float speciesMultiplier = 0.8F; switch (trees.Species) { // Hann, Marshall, and Hanus(2006) FRL Research Contribution 49 case FiaCode.PseudotsugaMenziesii: B0 = -5.34253119F; B1 = 1.098406840F; B2 = -0.05218621F; B3 = 1.01380810F; B4 = 0.91202025F; B5 = -0.01756220F; B6 = -0.05168923F; K1 = 6.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 1.0F; break; // Zumrawi and Hann(1993) FRL Research Contribution 4 case FiaCode.AbiesGrandis: B0 = -2.34619F; B1 = 0.594640F; B2 = -0.000976092F; B3 = 1.12712F; B4 = 0.555333F; B5 = -0.0000290672F; B6 = -0.0470848F; K1 = 1.0F; K2 = 2.0F; K3 = 2.0F; K4 = 5.0F; speciesMultiplier = 0.8722F; break; // Unpublished Equation on File at OSU Dept.Forest Resources case FiaCode.TsugaHeterophylla: B0 = -4.87447412F; B1 = 0.4150723209F; B2 = -0.023744997F; B3 = 0.907837299F; B4 = 1.1346766989F; B5 = -0.015333503F; B6 = -0.03309787F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 1.0F; break; // Hann and Hanus(2002) OSU Department of Forest Management Internal Report #2 case FiaCode.ThujaPlicata: B0 = -11.45456097F; B1 = 0.784133664F; B2 = -0.0261377888F; B3 = 0.70174783F; B4 = 2.057236260F; B5 = -0.00415440257F; B6 = 0.0F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.TaxusBrevifolia: B0 = -9.15835863F; B1 = 1.0F; B2 = -0.00000035F; B3 = 1.16688474F; B4 = 0.0F; B5 = 0.0F; B6 = -0.02F; K1 = 4000.0F; K2 = 4.0F; K3 = 1.0F; K4 = 2.7F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.ArbutusMenziesii: B0 = -8.84531757F; B1 = 1.5F; B2 = -0.0006F; B3 = 0.51225596F; B4 = 0.418129153F; B5 = -0.00355254593F; B6 = -0.0321315389F; K1 = 110.0F; K2 = 2.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 0.7928F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.AcerMacrophyllum: B0 = -3.41449922F; B1 = 1.0F; B2 = -0.05F; B3 = 0.0F; B4 = 0.324349277F; B5 = 0.0F; B6 = -0.0989519477F; K1 = 10.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; break; // Gould, Marshall, and Harrington(2008) West.J.Appl.For. 23: 26-33 case FiaCode.QuercusGarryana: B0 = -7.81267986F; B1 = 1.405616529F; B2 = -0.0603105850F; B3 = 0.64286007F; B4 = 1.037687142F; B5 = 0.0F; B6 = -0.0787012218F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 1.0F; break; // Hann and Hanus(2002) OSU Department of Forest Management Internal Report #1 case FiaCode.AlnusRubra: B0 = -4.39082007F; B1 = 1.0F; B2 = -0.0945057147F; B3 = 1.06867026F; B4 = 0.685908029F; B5 = -0.00586331028F; B6 = 0.0F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.CornusNuttallii: case FiaCode.Salix: B0 = -8.08352683F; B1 = 1.0F; B2 = -0.00000035F; B3 = 0.31176647F; B4 = 0.0F; B5 = 0.0F; B6 = -0.0730788052F; K1 = 4000.0F; K2 = 4.0F; K3 = 1.0F; K4 = 2.7F; break; default: throw Trees.CreateUnhandledSpeciesException(trees.Species); } speciesMultiplier *= growthMultiplier; for (int treeIndex = 0; treeIndex < trees.Count; ++treeIndex) { if (trees.LiveExpansionFactor[treeIndex] <= 0.0F) { trees.DbhGrowth[treeIndex] = 0.0F; continue; } float dbhInInches = trees.Dbh[treeIndex]; float basalAreaLarger = densityBeforeGrowth.GetBasalAreaLarger(dbhInInches); float crownRatio = trees.CrownRatio[treeIndex]; float LNDG = B0 + B1 * MathV.Ln(dbhInInches + K1) + B2 * MathV.Pow(dbhInInches, K2) + B3 * MathV.Ln((crownRatio + 0.2F) / 1.2F) + B4 * MathV.Ln(siteIndexFromDbh) + B5 * (MathV.Pow(basalAreaLarger, K3) / MathV.Ln(dbhInInches + K4)) + B6 * MathF.Sqrt(basalAreaLarger); float crownRatioAdjustment = OrganonGrowth.GetCrownRatioAdjustment(crownRatio); trees.DbhGrowth[treeIndex] = speciesMultiplier * MathV.Exp(LNDG) * crownRatioAdjustment; Debug.Assert(trees.DbhGrowth[treeIndex] > 0.0F); Debug.Assert(trees.DbhGrowth[treeIndex] < Constant.Maximum.DiameterIncrementInInches); } }
public override void GrowDiameter(Trees trees, float growthMultiplier, float siteIndexFromDbh, OrganonStandDensity densityBeforeGrowth) { // These species were annualized by adding ln(0.2) to the intercept terms: DF, WH, RC, ACMA3, Cornus, Salix float B0; float B1; float B2; float B3; float B4; float B5; float B6; float K1; float K2; float K3; float K4; float speciesMultiplier = 0.8F; switch (trees.Species) { // Hann, Bluhm, and Hibbs Red Alder Plantation Analysis case FiaCode.AlnusRubra: B0 = -4.622849554F; B1 = 0.5112200516F; B2 = -0.1040194568F; B3 = 0.9536538143F; B4 = 1.0659344724F; B5 = -0.0193047405F; B6 = -0.0773539455F; K1 = 1.0F; K2 = 1.0F; K3 = 1.0F; K4 = 1.0F; speciesMultiplier = 1.0F; break; // Hann, Marshall, and Hanus(2006) FRL Research Contribution ?? case FiaCode.PseudotsugaMenziesii: B0 = -6.95196910F; B1 = 1.098406840F; B2 = -0.05218621F; B3 = 1.01380810F; B4 = 0.91202025F; B5 = -0.01756220F; B6 = -0.05168923F; K1 = 6.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 1.0F; break; // Unpublished equation on file at OSU Deptartment of Forest Resources case FiaCode.TsugaHeterophylla: B0 = -6.48391203F; B1 = 0.4150723209F; B2 = -0.023744997F; B3 = 0.907837299F; B4 = 1.1346766989F; B5 = -0.015333503F; B6 = -0.03309787F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; speciesMultiplier = 1.0F; break; // Hann and Hanus(2002) OSU Department of Forest Management Internal Report #2 case FiaCode.ThujaPlicata: B0 = -13.06399888F; B1 = 0.784133664F; B2 = -0.0261377888F; B3 = 0.70174783F; B4 = 2.057236260F; B5 = -0.00415440257F; B6 = 0.0F; K1 = 5.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.AcerMacrophyllum: B0 = -5.02393713F; B1 = 1.0F; B2 = -0.05F; B3 = 0.0F; B4 = 0.324349277F; B5 = 0.0F; B6 = -0.0989519477F; K1 = 10.0F; K2 = 1.0F; K3 = 1.0F; K4 = 2.7F; break; // Hann and Hanus(2002) FRL Research Contribution 39 case FiaCode.CornusNuttallii: case FiaCode.Salix: B0 = -9.69296474F; B1 = 1.0F; B2 = -0.00000035F; B3 = 0.31176647F; B4 = 0.0F; B5 = 0.0F; B6 = -0.0730788052F; K1 = 4000.0F; K2 = 4.0F; K3 = 1.0F; K4 = 2.7F; break; default: throw Trees.CreateUnhandledSpeciesException(trees.Species); } speciesMultiplier *= growthMultiplier; for (int treeIndex = 0; treeIndex < trees.Count; ++treeIndex) { if (trees.LiveExpansionFactor[treeIndex] <= 0.0F) { trees.DbhGrowth[treeIndex] = 0.0F; continue; } float dbhInInches = trees.Dbh[treeIndex]; float basalAreaLarger = densityBeforeGrowth.GetBasalAreaLarger(dbhInInches); float crownRatio = trees.CrownRatio[treeIndex]; float LNDG = B0 + B1 * MathV.Ln(dbhInInches + K1) + B2 * MathV.Pow(dbhInInches, K2) + B3 * MathV.Ln((crownRatio + 0.2F) / 1.2F) + B4 * MathV.Ln(siteIndexFromDbh) + B5 * (MathV.Pow(basalAreaLarger, K3) / MathV.Ln(dbhInInches + K4)) + B6 * MathF.Sqrt(basalAreaLarger); float crownRatioAdjustment = OrganonGrowth.GetCrownRatioAdjustment(crownRatio); trees.DbhGrowth[treeIndex] = speciesMultiplier * MathV.Exp(LNDG) * crownRatioAdjustment; Debug.Assert(trees.DbhGrowth[treeIndex] > 0.0F); Debug.Assert(trees.DbhGrowth[treeIndex] < Constant.Maximum.DiameterIncrementInInches); } }
public override void ReduceExpansionFactors(OrganonStand stand, OrganonStandDensity densityBeforeGrowth, Trees trees, float fertilizationExponent) { // RAP MORTALITY float B0; float B1; float B2; float B3; float B4; float B5; float POW = 0.2F; switch (trees.Species) { // RA Coefficients from Hann, Bluhm, and Hibbs New Red Alder Equation case FiaCode.AlnusRubra: B0 = -4.333150734F; B1 = -0.9856713799F; B2 = 0.0F; B3 = -2.583317081F; B4 = 0.0369852164F; B5 = 0.0394546978F; POW = 1.0F; break; // Hann, Marshall, and Hanus(2006) FRL Research Contribution 49 case FiaCode.PseudotsugaMenziesii: B0 = -3.12161659F; B1 = -0.44724396F; B2 = 0.0F; B3 = -2.48387172F; B4 = 0.01843137F; B5 = 0.01353918F; break; // Hann, Marshall, Hanus(2003) FRL Research Contribution 40 case FiaCode.TsugaHeterophylla: B0 = -0.761609F; B1 = -0.529366F; B2 = 0.0F; B3 = -4.74019F; B4 = 0.0119587F; B5 = 0.00756365F; break; // WH of Hann, Marshall, Hanus(2003) FRL Research Contribution 40 case FiaCode.ThujaPlicata: B0 = -0.761609F; B1 = -0.529366F; B2 = 0.0F; B3 = -4.74019F; B4 = 0.0119587F; B5 = 0.00756365F; break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.AcerMacrophyllum: B0 = -2.976822456F; B1 = 0.0F; B2 = 0.0F; B3 = -6.223250962F; B4 = 0.0F; B5 = 0.0F; break; // Hann and Hanus(2001) FRL Research Contribution 34 case FiaCode.CornusNuttallii: B0 = -3.020345211F; B1 = 0.0F; B2 = 0.0F; B3 = -8.467882343F; B4 = 0.013966388F; B5 = 0.009461545F; break; // best guess case FiaCode.Salix: B0 = -1.386294361F; B1 = 0.0F; B2 = 0.0F; B3 = 0.0F; B4 = 0.0F; B5 = 0.0F; break; default: throw Trees.CreateUnhandledSpeciesException(trees.Species); } // BUGBUG: Fortran code didn't use red alder site index for red alder and used hemlock site index for all conifers, not just hemlock and redcedar float siteIndex = stand.HemlockSiteIndex; // interpreted as Douglas-fir site index if (trees.Species == FiaCode.AlnusRubra) { siteIndex = stand.SiteIndex; } else if ((trees.Species == FiaCode.TsugaHeterophylla) || (trees.Species == FiaCode.ThujaPlicata)) { siteIndex = OrganonVariantNwo.ToHemlockSiteIndexStatic(siteIndex); // convert from Douglas-fir site index to actual hemlock site inde } for (int treeIndex = 0; treeIndex < trees.Count; ++treeIndex) { if (trees.LiveExpansionFactor[treeIndex] <= 0.0F) { continue; } float dbhInInches = trees.Dbh[treeIndex]; float basalAreaLarger = densityBeforeGrowth.GetBasalAreaLarger(dbhInInches); float crownRatio = trees.CrownRatio[treeIndex]; float PMK = B0 + B1 * dbhInInches + B2 * dbhInInches * dbhInInches + B3 * crownRatio + B4 * siteIndex + B5 * basalAreaLarger + fertilizationExponent; float XPM = 1.0F / (1.0F + MathV.Exp(-PMK)); float survivalProbability = POW == 1.0 ? 1.0F - XPM : MathV.Pow(1.0F - XPM, POW); // RAP is the only variant using unfertlized POW != 1 survivalProbability *= OrganonGrowth.GetCrownRatioAdjustment(crownRatio); Debug.Assert(survivalProbability >= 0.0F); Debug.Assert(survivalProbability <= 1.0F); float newLiveExpansionFactor = survivalProbability * trees.LiveExpansionFactor[treeIndex]; if (newLiveExpansionFactor < 0.00001F) { newLiveExpansionFactor = 0.0F; } float mortalityExpansionFactor = trees.LiveExpansionFactor[treeIndex] - newLiveExpansionFactor; trees.DeadExpansionFactor[treeIndex] = mortalityExpansionFactor; trees.LiveExpansionFactor[treeIndex] = newLiveExpansionFactor; } }
public static void ReduceExpansionFactors(OrganonConfiguration configuration, int simulationStep, OrganonStand stand, OrganonStandDensity densityBeforeGrowth) { foreach (Trees treesOfSpecies in stand.TreesBySpecies.Values) { FiaCode species = treesOfSpecies.Species; float fertilizationExponent = OrganonMortality.GetMortalityFertilizationAdjustment(species, configuration.Variant.TreeModel, simulationStep, configuration.Treatments); configuration.Variant.ReduceExpansionFactors(stand, densityBeforeGrowth, treesOfSpecies, fertilizationExponent); } }