コード例 #1
0
 /// <summary>
 /// Populate the allocator with information about each plant species (or cohort).
 /// These routines should be called for each "species" in each time step before
 /// computing the water uptake rate.
 /// </summary>
 /// <param name="Idx">Index number for this "species"</param>
 /// <param name="WaterDemand">Potential water uptake kg/m^2/d = mm/d</param>
 public virtual void setPlantDemand(int Idx, double WaterDemand)
 {
     checkPlantIndex(Idx);
     if (FPlantInfo[Idx] == null)
     {
         FPlantInfo[Idx] = new PlantUptake();
     }
     FPlantInfo[Idx].Demand = WaterDemand;       //WaterDemand is already in kg/m^2/d
 }
コード例 #2
0
 /// <summary>
 /// Zeroes the plant information in case an index is left unused
 /// </summary>
 public virtual void initTimeStep()
 {
     FPlantInfo = new PlantUptake[GrazType.MaxPlantSpp];
     for (int Idx = 0; Idx <= FNoPlants - 1; Idx++)
     {
         FPlantInfo[Idx] = new PlantUptake();
     }
     FWaterUptake = new double[GrazType.MaxPlantSpp, GrazType.MaxSoilLayers];
     FSoilFract   = new double[GrazType.MaxPlantSpp, GrazType.MaxSoilLayers];
 }