Пример #1
0
        protected void OnDoPotentialPlantGrowth(object sender, EventArgs e)
        {
            if (Plant.IsEmerged)
            {
                if (MicroClimatePresent == false)
                {
                    throw new Exception(this.Name + " is trying to calculate water demand but no MicroClimate module is present.  Include a microclimate node in your zone");
                }

                Detached.Clear();
                FRGR   = FRGRFunction.Value();
                Height = HeightFunction.Value();
                //Initialise biomass and nitrogen

                Leaves.Add(new PerrenialLeafCohort());
                if (Leaves.Count == 1)
                {
                    AddNewLeafMaterial(StructuralWt: InitialWtFunction.Value(),
                                       StorageWt: 0,
                                       StructuralN: InitialWtFunction.Value() * MinimumNConc.Value(),
                                       StorageN: InitialWtFunction.Value() * (MaximumNConc.Value() - MinimumNConc.Value()),
                                       SLA: SpecificLeafAreaFunction.Value());
                }

                foreach (PerrenialLeafCohort L in Leaves)
                {
                    L.Age++;
                }

                StartLive = Live;
                StartNReallocationSupply    = NSupply.Reallocation;
                StartNRetranslocationSupply = NSupply.Retranslocation;
            }
        }
Пример #2
0
 /// <summary>
 /// Clear the leaf cohorts.
 /// </summary>
 public void Clear()
 {
     leaves.Clear();
     live.Clear();
     dead.Clear();
     Lai     = 0;
     LaiDead = 0;
 }
Пример #3
0
 /// <summary>Recalculate live and dead biomass if necessary</summary>
 private void RecalculateLiveDead()
 {
     if (needToRecalculateLiveDead)
     {
         needToRecalculateLiveDead = false;
         liveBiomass.Clear();
         deadBiomass.Clear();
         foreach (Biomass b in PlantZone.LayerLive)
         {
             liveBiomass.Add(b);
         }
         foreach (Biomass b in PlantZone.LayerDead)
         {
             deadBiomass.Add(b);
         }
     }
 }
Пример #4
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live.Clear();
     Dead.Clear();
     DMRetranslocationSupply         = 0.0;
     DMReallocationSupply            = 0.0;
     NRetranslocationSupply          = 0.0;
     NReallocationSupply             = 0.0;
     PotentialDMAllocation           = 0.0;
     PotentialStructuralDMAllocation = 0.0;
     PotentialMetabolicDMAllocation  = 0.0;
     StructuralDMDemand = 0.0;
     StorageDMDemand    = 0.0;
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #5
0
 /// <summary>Clears this instance.</summary>
 private void Clear()
 {
     Live.Clear();
     Dead.Clear();
 }
Пример #6
0
 /// <summary>Clears this instance.</summary>
 virtual protected void Clear()
 {
     Live.Clear();
     Dead.Clear();
 }