//--------------------------------------------------------------------- public void CohortPartialMortality(object sender, Landis.Library.BiomassCohorts.PartialDeathEventArgs eventArgs) { ExtensionType disturbanceType = eventArgs.DisturbanceType; ActiveSite site = eventArgs.Site; double reduction = eventArgs.Reduction; ICohort cohort = (Landis.Library.LeafBiomassCohorts.ICohort)eventArgs.Cohort; float fractionPartialMortality = (float)eventArgs.Reduction; //PlugIn.ModelCore.UI.WriteLine("Cohort experienced partial mortality: species={0}, age={1}, wood_biomass={2}, fraction_mortality={3:0.0}.", cohort.Species.Name, cohort.Age, cohort.WoodBiomass, fractionPartialMortality); AgeOnlyDisturbances.PoolPercentages cohortReductions = AgeOnlyDisturbances.Module.Parameters.CohortReductions[disturbanceType]; float foliar = cohort.LeafBiomass * fractionPartialMortality; float wood = cohort.WoodBiomass * fractionPartialMortality; float foliarInput = AgeOnlyDisturbances.Events.ReduceInput(foliar, cohortReductions.Foliar, site); float woodInput = AgeOnlyDisturbances.Events.ReduceInput(wood, cohortReductions.Wood, site); ForestFloor.AddWoodLitter(woodInput, cohort.Species, site); ForestFloor.AddFoliageLitter(foliarInput, cohort.Species, site); Roots.AddCoarseRootLitter(woodInput, cohort, cohort.Species, site); // All of cohorts roots are killed. Roots.AddFineRootLitter(foliarInput, cohort, cohort.Species, site); //PlugIn.ModelCore.UI.WriteLine("EVENT: Cohort Partial Mortality: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, disturbanceType); //PlugIn.ModelCore.UI.WriteLine(" Cohort Reductions: Foliar={0:0.00}. Wood={1:0.00}.", cohortReductions.Foliar, cohortReductions.Wood); //PlugIn.ModelCore.UI.WriteLine(" InputB/TotalB: Foliar={0:0.00}/{1:0.00}, Wood={2:0.0}/{3:0.0}.", foliarInput, foliar, woodInput, wood); return; }
//--------------------------------------------------------------------- public void CohortDied(object sender, Landis.Library.BiomassCohorts.DeathEventArgs eventArgs) { ExtensionType disturbanceType = eventArgs.DisturbanceType; ActiveSite site = eventArgs.Site; ICohort cohort = (Landis.Library.LeafBiomassCohorts.ICohort)eventArgs.Cohort; double foliar = (double)cohort.LeafBiomass; double wood = (double)cohort.WoodBiomass; PlugIn.ModelCore.UI.WriteLine("Cohort Died: species={0}, age={1}, biomass={2}, foliage={3}.", cohort.Species.Name, cohort.Age, cohort.Biomass, foliar); if (disturbanceType == null) { //PlugIn.ModelCore.UI.WriteLine("NO EVENT: Cohort Died: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, eventArgs.DisturbanceType); ForestFloor.AddWoodLitter(wood, cohort.Species, eventArgs.Site); ForestFloor.AddFoliageLitter(foliar, cohort.Species, eventArgs.Site); Roots.AddCoarseRootLitter(wood, cohort, cohort.Species, eventArgs.Site); Roots.AddFineRootLitter(foliar, cohort, cohort.Species, eventArgs.Site); } if (disturbanceType != null) { //PlugIn.ModelCore.UI.WriteLine("DISTURBANCE EVENT: Cohort Died: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, eventArgs.DisturbanceType); Disturbed[site] = true; if (disturbanceType.IsMemberOf("disturbance:fire")) { Landis.Library.Succession.Reproduction.CheckForPostFireRegen(eventArgs.Cohort, site); } else { Landis.Library.Succession.Reproduction.CheckForResprouting(eventArgs.Cohort, site); } } }