예제 #1
0
        //---------------------------------------------------------------------

        public void CohortPartialMortality(object sender, Landis.Library.BiomassCohorts.PartialDeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            ActiveSite    site            = eventArgs.Site;

            Landis.Library.BiomassCohorts.ICohort cohort = eventArgs.Cohort;

            double fractionPartialMortality = (double)eventArgs.Reduction / (double)cohort.Biomass;
            //PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY START: species={0}, age={1}, biomass={2}, fraction_mortality={3:0.00}.", cohort.Species.Name, cohort.Age, cohort.Biomass, fractionPartialMortality);

            int nonWoody = cohort.ComputeNonWoodyBiomass(site);
            int woody    = (cohort.Biomass - nonWoody);

            int foliarInput = (int)((double)nonWoody * fractionPartialMortality);
            int woodInput   = (int)((double)woody * fractionPartialMortality);

            if (disturbanceType.IsMemberOf("disturbance:harvest") || disturbanceType.IsMemberOf("disturbance:fire"))
            {
                AgeOnlyDisturbances.PoolPercentages cohortReductions = AgeOnlyDisturbances.Module.Parameters.CohortReductions[disturbanceType];

                foliarInput = AgeOnlyDisturbances.Events.ReduceInput(foliarInput, cohortReductions.Foliar);
                woodInput   = AgeOnlyDisturbances.Events.ReduceInput(woodInput, cohortReductions.Wood);
            }

            ForestFloor.AddWoody(woodInput, cohort.Species, site);
            ForestFloor.AddLitter(foliarInput, cohort.Species, site);

            //PlugIn.ModelCore.UI.WriteLine("       BIOMASS SUCCESSION PARTIAL MORTALITY SUMMARY: Cohort Partial Mortality: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, disturbanceType);
            //PlugIn.ModelCore.UI.WriteLine("           InputB/TotalB:  Foliar={0:0.00}/{1:0.00}, Wood={2:0.0}/{3:0.0}.", foliarInput, nonWoody, woodInput, woody);

            return;
        }
        //---------------------------------------------------------------------

        public void CohortPartialMortality(object sender, Landis.Library.BiomassCohorts.PartialDeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            ActiveSite    site            = eventArgs.Site;

            Landis.Library.BiomassCohorts.ICohort cohort = 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];

            int nonWoody = cohort.ComputeNonWoodyBiomass(site);
            int woody    = (cohort.Biomass - nonWoody);

            int foliar = (int)(nonWoody * fractionPartialMortality);
            int wood   = (int)(woody * fractionPartialMortality);

            int foliarInput = AgeOnlyDisturbances.Events.ReduceInput(foliar, cohortReductions.Foliar);
            int woodInput   = AgeOnlyDisturbances.Events.ReduceInput(wood, cohortReductions.Wood);

            ForestFloor.AddWoody(woodInput, cohort.Species, site);
            ForestFloor.AddLitter(foliarInput, 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;
        }
예제 #3
0
        //---------------------------------------------------------------------

        private double UpdateDeadBiomass(ICohort cohort, double actualANPP, double totalMortality, ActiveSite site, double newBiomass)
        {
            ISpecies species       = cohort.Species;
            double   leafLongevity = SpeciesData.LeafLongevity[species];
            double   cohortBiomass = newBiomass; // Mortality is for the current year's biomass.
            double   leafFraction  = ComputeFractionANPPleaf(species);

            // First, deposit the a portion of the leaf mass directly onto the forest floor.
            // In this way, the actual amount of leaf biomass is added for the year.

            double annualLeafANPP = actualANPP * leafFraction;

            ForestFloor.AddLitter(annualLeafANPP, species, site);

            // --------------------------------------------------------------------------------
            // The next section allocates mortality from standing (wood and leaf) biomass, i.e.,
            // biomass that has accrued from previous years' growth.

            // Subtract annual leaf growth as that was taken care of above.
            totalMortality -= annualLeafANPP;

            // Assume that standing foliage is equal to this years annualLeafANPP * leaf longevity
            // minus this years leaf ANPP.  This assumes that actual ANPP has been relatively constant
            // over the past 2 or 3 years (if coniferous).

            double standing_nonwood = (annualLeafANPP * leafLongevity) - annualLeafANPP;
            double standing_wood    = Math.Max(0, cohortBiomass - standing_nonwood);

            double fractionStandingNonwood = standing_nonwood / cohortBiomass;

            //  Assume that the remaining mortality is divided proportionally
            //  between the woody mass and non-woody mass (Niklaus & Enquist,
            //  2002).   Do not include current years growth.
            double mortality_nonwood = Math.Max(0.0, totalMortality * fractionStandingNonwood);
            double mortality_wood    = Math.Max(0.0, totalMortality - mortality_nonwood);

            if (mortality_wood < 0 || mortality_nonwood < 0)
            {
                throw new ApplicationException("Error: Woody input is < 0");
            }

            //  Add mortality to dead biomass pools.

            if (mortality_wood > 0)
            {
                ForestFloor.AddWoody((ushort)mortality_wood, species, site);
            }

            if (mortality_nonwood > 0)
            {
                ForestFloor.AddLitter(mortality_nonwood, species, site);
            }

            //  Total mortality not including annual leaf litter
            M_noLeafLitter = (int)mortality_wood;

            return(annualLeafANPP + mortality_nonwood + mortality_wood);
        }
예제 #4
0
        //---------------------------------------------------------------------

        public void CohortPartialMortality(object sender, Landis.Library.BiomassCohorts.PartialDeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            ActiveSite    site            = eventArgs.Site;

            Landis.Library.BiomassCohorts.ICohort cohort = eventArgs.Cohort;

            double fractionPartialMortality = (double)eventArgs.Reduction / (double)cohort.Biomass;
            //PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY START: species={0}, age={1}, biomass={2}, fraction_mortality={3:0.00}.", cohort.Species.Name, cohort.Age, cohort.Biomass, fractionPartialMortality);

            int nonWoody = cohort.ComputeNonWoodyBiomass(site);
            int woody    = (cohort.Biomass - nonWoody);

            float foliarInput = ((float)nonWoody * (float)fractionPartialMortality);
            float woodInput   = ((float)woody * (float)fractionPartialMortality);

            if (disturbanceType.IsMemberOf("disturbance:harvest"))
            {
                SiteVars.HarvestPrescriptionName = PlugIn.ModelCore.GetSiteVar <string>("Harvest.PrescriptionName");
                if (!Disturbed[site]) // this is the first cohort killed/damaged
                {
                    HarvestEffects.ReduceLayers(SiteVars.HarvestPrescriptionName[site], site);
                }
                woodInput   -= woodInput * (float)HarvestEffects.GetCohortWoodRemoval(site);
                foliarInput -= foliarInput * (float)HarvestEffects.GetCohortLeafRemoval(site);
            }
            if (disturbanceType.IsMemberOf("disturbance:fire"))
            {
                SiteVars.FireSeverity = PlugIn.ModelCore.GetSiteVar <byte>("Fire.Severity");

                if (!Disturbed[site]) // this is the first cohort killed/damaged
                {
                    if (SiteVars.FireSeverity != null && SiteVars.FireSeverity[site] > 0)
                    {
                        FireEffects.ReduceLayers(SiteVars.FireSeverity[site], site);
                    }
                }

                double woodFireConsumption   = woodInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].CoarseLitterReduction;
                double foliarFireConsumption = foliarInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].FineLitterReduction;

                woodInput   -= (float)woodFireConsumption;
                foliarInput -= (float)foliarFireConsumption;
            }

            ForestFloor.AddWoody(woodInput, cohort.Species, site);
            ForestFloor.AddLitter(foliarInput, cohort.Species, site);

            //PlugIn.ModelCore.UI.WriteLine("       BIOMASS SUCCESSION PARTIAL MORTALITY SUMMARY: Cohort Partial Mortality: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, disturbanceType);
            //PlugIn.ModelCore.UI.WriteLine("           InputB/TotalB:  Foliar={0:0.00}/{1:0.00}, Wood={2:0.0}/{3:0.0}.", foliarInput, nonWoody, woodInput, woody);

            return;
        }
        public void CohortTotalMortality(object sender, DeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            ActiveSite    site            = eventArgs.Site;

            ICohort cohort      = (Landis.Library.BiomassCohorts.ICohort)eventArgs.Cohort;
            int     foliarInput = cohort.ComputeNonWoodyBiomass(site);
            int     woodInput   = (cohort.Biomass - foliarInput);

            if (disturbanceType != null)
            {
                if (PlugIn.CalibrateMode && PlugIn.ModelCore.CurrentTime > 0)
                {
                    PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION TOTAL MORTALITY: species={0}, age={1}, woodInput={2}, foliarInputs={3}.", cohort.Species.Name, cohort.Age, woodInput, foliarInput);
                }

                if (disturbanceType.IsMemberOf("disturbance:fire"))
                {
                    SiteVars.FireSeverity = PlugIn.ModelCore.GetSiteVar <byte>("Fire.Severity");
                    Landis.Library.Succession.Reproduction.CheckForPostFireRegen(eventArgs.Cohort, site);

                    if (!Disturbed[site])  // the first cohort killed/damaged
                    {
                        if (SiteVars.FireSeverity != null && SiteVars.FireSeverity[site] > 0)
                        {
                            FireEffects.ReduceLayers(SiteVars.FireSeverity[site], site);
                        }
                    }

                    double woodFireConsumption   = woodInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].CoarseLitterReduction;
                    double foliarFireConsumption = foliarInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].FineLitterReduction;

                    woodInput   -= (int)woodFireConsumption;
                    foliarInput -= (int)foliarFireConsumption;
                }
                else
                {
                    if (disturbanceType.IsMemberOf("disturbance:harvest"))
                    {
                        SiteVars.HarvestPrescriptionName = PlugIn.ModelCore.GetSiteVar <string>("Harvest.PrescriptionName");
                        if (!Disturbed[site])  // the first cohort killed/damaged
                        {
                            HarvestEffects.ReduceLayers(SiteVars.HarvestPrescriptionName[site], site);
                        }
                        woodInput   -= (int)(woodInput * (float)HarvestEffects.GetCohortWoodRemoval(site));
                        foliarInput -= (int)(foliarInput * (float)HarvestEffects.GetCohortLeafRemoval(site));
                    }

                    // If not fire, check for resprouting:
                    Landis.Library.Succession.Reproduction.CheckForResprouting(eventArgs.Cohort, site);
                }
            }

            //PlugIn.ModelCore.UI.WriteLine("Cohort Died: species={0}, age={1}, wood={2:0.00}, foliage={3:0.00}.", cohort.Species.Name, cohort.Age, wood, foliar);
            ForestFloor.AddWoody(woodInput, cohort.Species, eventArgs.Site);
            ForestFloor.AddLitter(foliarInput, cohort.Species, eventArgs.Site);

            // Assume that ALL dead root biomass stays on site.
            //Roots.AddCoarseRootLitter(Roots.CalculateCoarseRoot(cohort, cohort.WoodBiomass), cohort, cohort.Species, eventArgs.Site);
            //Roots.AddFineRootLitter(Roots.CalculateFineRoot(cohort, cohort.LeafBiomass), cohort, cohort.Species, eventArgs.Site);

            if (disturbanceType != null)
            {
                Disturbed[site] = true;
            }

            return;

            //ExtensionType disturbanceType = eventArgs.DisturbanceType;
            //if (disturbanceType != null)
            //{
            //    ActiveSite site = eventArgs.Site;
            //    Disturbed[site] = true;
            //    if (disturbanceType.IsMemberOf("disturbance:fire"))
            //        Reproduction.CheckForPostFireRegen(eventArgs.Cohort, site);
            //    else
            //        Reproduction.CheckForResprouting(eventArgs.Cohort, site);
            //}
        }
        //---------------------------------------------------------------------

        public void CohortPartialMortality(object sender, Landis.Library.BiomassCohorts.PartialDeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            ActiveSite    site            = eventArgs.Site;

            Landis.Library.BiomassCohorts.ICohort cohort = eventArgs.Cohort;

            double partialMortality = (double)eventArgs.Reduction;

            if (PlugIn.CalibrateMode && PlugIn.ModelCore.CurrentTime > 0)
            {
                PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY I: species={0}, age={1}, disturbance={2}.", cohort.Species.Name, cohort.Age, disturbanceType);
                PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY I: eventReduction={0:0.0}, new_cohort_biomass={1}.", eventArgs.Reduction, cohort.Biomass);
            }
            double nonWoodyFraction = (double)cohort.ComputeNonWoodyBiomass(site) / (double)cohort.Biomass;
            double woodyFraction    = 1.0 - nonWoodyFraction;

            float foliarInput = (float)(partialMortality * nonWoodyFraction); // ((float) nonWoody * (float) fractionPartialMortality);
            float woodInput   = (float)(partialMortality * woodyFraction);    // ((float) woody * (float) fractionPartialMortality);

            if (PlugIn.CalibrateMode && PlugIn.ModelCore.CurrentTime > 0)
            {
                PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY II: species={0}, age={1}, woodInput={2}, foliarInputs={3}.", cohort.Species.Name, cohort.Age, woodInput, foliarInput);
            }


            if (disturbanceType.IsMemberOf("disturbance:harvest"))
            {
                SiteVars.HarvestPrescriptionName = PlugIn.ModelCore.GetSiteVar <string>("Harvest.PrescriptionName");
                if (!Disturbed[site]) // this is the first cohort killed/damaged
                {
                    HarvestEffects.ReduceLayers(SiteVars.HarvestPrescriptionName[site], site);
                }
                woodInput   -= woodInput * (float)HarvestEffects.GetCohortWoodRemoval(site);
                foliarInput -= foliarInput * (float)HarvestEffects.GetCohortLeafRemoval(site);
            }
            //PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY: species={0}, age={1}, woodInput={2}, foliarInputs={3}.", cohort.Species.Name, cohort.Age, woodInput, foliarInput);
            if (disturbanceType.IsMemberOf("disturbance:fire"))
            {
                SiteVars.FireSeverity = PlugIn.ModelCore.GetSiteVar <byte>("Fire.Severity");

                if (!Disturbed[site]) // this is the first cohort killed/damaged
                {
                    if (SiteVars.FireSeverity != null && SiteVars.FireSeverity[site] > 0)
                    {
                        FireEffects.ReduceLayers(SiteVars.FireSeverity[site], site);
                    }
                }

                double woodFireConsumption   = woodInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].CoarseLitterReduction;
                double foliarFireConsumption = foliarInput * (float)FireEffects.ReductionsTable[(int)SiteVars.FireSeverity[site]].FineLitterReduction;

                woodInput   -= (float)woodFireConsumption;
                foliarInput -= (float)foliarFireConsumption;
            }

            if (PlugIn.CalibrateMode && PlugIn.ModelCore.CurrentTime > 0)
            {
                PlugIn.ModelCore.UI.WriteLine("   BIOMASS SUCCESSION PARTIAL MORTALITY III: ForestFloorInputs: Foliar={0:0.00}, Wood={1:0.0}.", foliarInput, woodInput);
            }

            ForestFloor.AddWoody(woodInput, cohort.Species, site);
            ForestFloor.AddLitter(foliarInput, cohort.Species, site);

            if (disturbanceType != null)
            {
                Disturbed[site] = true;
            }


            return;
        }