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