//---------------------------------------------------------------------
 private InitialBiomass(SiteCohorts cohorts,
     Pool deadWoodyPool,
     Pool deadNonWoodyPool)
 {
     this.cohorts = cohorts;
     this.deadWoodyPool = deadWoodyPool;
     this.deadNonWoodyPool = deadNonWoodyPool;
 }
        //---------------------------------------------------------------------
        /// <summary>
        /// Initializes the module.
        /// </summary>
        public static void Initialize()
        {
            numberofcanopylayers = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
            cohorts = PlugIn.ModelCore.Landscape.NewSiteVar<ISiteCohorts>();
            BiomassCohortsSiteVar = new BiomassCohortsSiteVar(cohorts);
            baseCohortsSiteVar = new Landis.Extension.Succession.Biomass.BaseCohortsSiteVar(BiomassCohortsSiteVar);
            woodyDebris     = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            litter          = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            HasSiteOutput = PlugIn.ModelCore.Landscape.NewSiteVar<bool>();
            SnowPack = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            Water = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            Infiltration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            establishments = PlugIn.ModelCore.Landscape.NewSiteVar<Landis.Extension.Succession.Biomass.Species.AuxParm<bool>>();
            pest = PlugIn.ModelCore.Landscape.NewSiteVar<Landis.Extension.Succession.Biomass.Species.AuxParm<float>>();
            TotalBiomass = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
            AnnualTranspiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            CanopyLAI = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            GrossPsn = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            NetPsn = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            transpiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            AutotrophicRespiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            HeterotrophicRespiration = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            WFPS = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            CanopyLAImax = PlugIn.ModelCore.Landscape.NewSiteVar<float>();

            SubCanopyPAR = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            SubCanopyPARmax = PlugIn.ModelCore.Landscape.NewSiteVar<float>();
            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                //  site cohorts are initialized by the PlugIn.InitializeSite method
                woodyDebris[site] = new Pool();
                litter[site] = new Pool();
                HasSiteOutput[site] = false;
                SnowPack[site] = 0;
                Water[site] = 0;
                Infiltration[site] = 0;
                TotalBiomass[site] = 0;
                numberofcanopylayers[site] = 0;
                GrossPsn[site] = 0;
                NetPsn[site] = 0;
                AutotrophicRespiration[site] = 0;
                HeterotrophicRespiration[site] = 0;
                transpiration[site] = 0;
                WFPS[site] = 0;
                establishments[site] = new Landis.Extension.Succession.Biomass.Species.AuxParm<bool>(PlugIn.ModelCore.Species);
                pest[site] = new Landis.Extension.Succession.Biomass.Species.AuxParm<float>(PlugIn.ModelCore.Species);

                AnnualTranspiration[site] = 0;
                CanopyLAI[site] = 0;
                SubCanopyPAR[site] = 0;
                SubCanopyPARmax[site] = 0;
                foreach (ISpecies spc in PlugIn.ModelCore.Species)
                {
                    establishments[site][spc] = false;
                    pest[site][spc] = 0;
                }
            }
            PlugIn.ModelCore.RegisterSiteVar(cohorts, "Succession.BiomassCohortsPnET");
            PlugIn.ModelCore.RegisterSiteVar(BiomassCohortsSiteVar, "Succession.BiomassCohorts");
            PlugIn.ModelCore.RegisterSiteVar(baseCohortsSiteVar, "Succession.AgeCohorts");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Establishments, "Succession.Establishments");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.WoodyDebris, "Succession.WoodyDebris");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Litter, "Succession.Litter");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.HasSiteOutput, "Succession.HasSiteOutput");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Water, "Succession.SoilWater");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.AnnualTranspiration , "Succession.AnnualTranspiration");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.SubCanopyPAR, "Succession.SubCanopyPARmax");

            PlugIn.ModelCore.RegisterSiteVar(SiteVars.CanopyLAImax, "Succession.CanopyLAImax");
        }
        //---------------------------------------------------------------------
        /// <summary>
        /// Initializes the module.
        /// </summary>
        public static void Initialize()
        {
            cohorts = PlugIn.ModelCore.Landscape.NewSiteVar<SiteCohorts>();
            woodyDebris     = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            litter          = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            percentShade    = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            lightTrans      = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            ag_npp          = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            //lai         = PlugIn.ModelCore.Landscape.NewSiteVar<double>();

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                //  site cohorts are initialized by the PlugIn.InitializeSite method
                woodyDebris[site] = new Pool();
                litter[site] = new Pool();
            }

            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Cohorts, "Succession.Cohorts");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.WoodyDebris, "Succession.WoodyDebris");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Litter, "Succession.Litter");
        }
        public Pool Clone()
        {
            Pool newPool = new Pool();

            newPool.Mass = this.mass;
            newPool.DecayValue = this.decayValue;
            newPool.InitialMass = this.initialMass;
            return newPool;
        }
        //---------------------------------------------------------------------
        /// <summary>
        /// Initializes the module.
        /// </summary>
        public static void Initialize()
        {
            biomassCohorts = PlugIn.ModelCore.Landscape.NewSiteVar<Library.BiomassCohorts.SiteCohorts>();
            baseCohortsSiteVar = new BaseCohortsSiteVar(biomassCohorts);

            woodyDebris     = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            litter          = PlugIn.ModelCore.Landscape.NewSiteVar<Pool>();
            percentShade    = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            lightTrans      = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            ag_npp          = PlugIn.ModelCore.Landscape.NewSiteVar<double>();
            previousYearMortality        = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
            currentYearMortality = PlugIn.ModelCore.Landscape.NewSiteVar<int>();
            totalBiomass = PlugIn.ModelCore.Landscape.NewSiteVar<int>();

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                //  site cohorts are initialized by the PlugIn.InitializeSite method
                woodyDebris[site] = new Pool();
                litter[site] = new Pool();
            }

            currentYearMortality.ActiveSiteValues = 0;
            previousYearMortality.ActiveSiteValues = 0;

            PlugIn.ModelCore.RegisterSiteVar(biomassCohorts, "Succession.BiomassCohorts");
            PlugIn.ModelCore.RegisterSiteVar(baseCohortsSiteVar, "Succession.BaseCohorts");

            PlugIn.ModelCore.RegisterSiteVar(SiteVars.WoodyDebris, "Succession.WoodyDebris");
            PlugIn.ModelCore.RegisterSiteVar(SiteVars.Litter, "Succession.Litter");
        }