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; } }
/// <summary> /// Clear the leaf cohorts. /// </summary> public void Clear() { leaves.Clear(); live.Clear(); dead.Clear(); Lai = 0; LaiDead = 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); } } }
/// <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(); }
/// <summary>Clears this instance.</summary> private void Clear() { Live.Clear(); Dead.Clear(); }
/// <summary>Clears this instance.</summary> virtual protected void Clear() { Live.Clear(); Dead.Clear(); }