예제 #1
0
        /// <summary>Send an energy balance event</summary>
        private void SendEnergyBalanceEvent()
        {
            for (int j = 0; j <= Canopies.Count - 1; j++)
            {
                CanopyType componentData = Canopies[j];

                if (componentData.Canopy != null)
                {
                    CanopyEnergyBalanceInterceptionlayerType[] lightProfile = new CanopyEnergyBalanceInterceptionlayerType[numLayers];
                    double totalPotentialEp  = 0;
                    double totalInterception = 0.0;
                    for (int i = 0; i <= numLayers - 1; i++)
                    {
                        lightProfile[i]           = new CanopyEnergyBalanceInterceptionlayerType();
                        lightProfile[i].thickness = Convert.ToSingle(DeltaZ[i]);
                        lightProfile[i].amount    = Convert.ToSingle(componentData.Rs[i] * RadnGreenFraction(j));
                        totalPotentialEp         += componentData.PET[i];
                        totalInterception        += componentData.interception[i];
                    }

                    componentData.Canopy.PotentialEP  = totalPotentialEp;
                    componentData.Canopy.LightProfile = lightProfile;
                }
            }
        }
예제 #2
0
 /// <summary>Send an energy balance event</summary>
 private void SetCanopyEnergyTerms(MicroClimateZone MCZone)
 {
     for (int j = 0; j <= MCZone.Canopies.Count - 1; j++)
     {
         if (MCZone.Canopies[j].Canopy != null)
         {
             CanopyEnergyBalanceInterceptionlayerType[] lightProfile = new CanopyEnergyBalanceInterceptionlayerType[MCZone.numLayers];
             double totalPotentialEp  = 0;
             double totalInterception = 0.0;
             for (int i = 0; i <= MCZone.numLayers - 1; i++)
             {
                 lightProfile[i]           = new CanopyEnergyBalanceInterceptionlayerType();
                 lightProfile[i].thickness = MCZone.DeltaZ[i];
                 lightProfile[i].amount    = MCZone.Canopies[j].Rs[i] * MCZone.RadnGreenFraction(j);
                 totalPotentialEp         += MCZone.Canopies[j].PET[i];
                 totalInterception        += MCZone.Canopies[j].interception[i];
             }
             MCZone.Canopies[j].Canopy.PotentialEP  = totalPotentialEp;
             MCZone.Canopies[j].Canopy.LightProfile = lightProfile;
         }
     }
 }
예제 #3
0
 /// <summary>Send an energy balance event</summary>
 public void SetCanopyEnergyTerms()
 {
     for (int j = 0; j <= Canopies.Count - 1; j++)
     {
         if (Canopies[j].Canopy != null)
         {
             CanopyEnergyBalanceInterceptionlayerType[] lightProfile = new CanopyEnergyBalanceInterceptionlayerType[numLayers];
             double totalPotentialEp  = 0;
             double totalInterception = 0.0;
             for (int i = 0; i <= numLayers - 1; i++)
             {
                 lightProfile[i]           = new CanopyEnergyBalanceInterceptionlayerType();
                 lightProfile[i].thickness = DeltaZ[i];
                 lightProfile[i].amount    = Canopies[j].Rs[i] * RadnGreenFraction(j);
                 totalPotentialEp         += Canopies[j].PET[i];
                 totalInterception        += Canopies[j].interception[i];
             }
             Canopies[j].Canopy.PotentialEP  = totalPotentialEp;
             Canopies[j].Canopy.WaterDemand  = totalPotentialEp;
             Canopies[j].Canopy.LightProfile = lightProfile;
         }
     }
 }