Esempio n. 1
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double minTair             = a.minTair;
            double maxTair             = a.maxTair;
            double solarRadiation      = a.solarRadiation;
            double vaporPressure       = a.vaporPressure;
            double extraSolarRadiation = a.extraSolarRadiation;
            double netRadiation;
            double netOutGoingLongWaveRadiation;
            double Nsr;
            double clearSkySolarRadiation;
            double averageT;
            double surfaceEmissivity;
            double cloudCoverFactor;
            double Nolr;

            Nsr = (1.0d - albedoCoefficient) * solarRadiation;
            clearSkySolarRadiation = (0.75d + (2 * Math.Pow(10.0d, -5) * elevation)) * extraSolarRadiation;
            averageT          = (Math.Pow(maxTair + 273.16d, 4) + Math.Pow(minTair + 273.16d, 4)) / 2.0d;
            surfaceEmissivity = 0.34d - (0.14d * Math.Sqrt(vaporPressure / 10.0d));
            cloudCoverFactor  = 1.35d * (solarRadiation / clearSkySolarRadiation) - 0.35d;
            Nolr         = stefanBoltzman * averageT * surfaceEmissivity * cloudCoverFactor;
            netRadiation = Nsr - Nolr;
            netOutGoingLongWaveRadiation = Nolr;
            a.netRadiation = netRadiation;
            a.netOutGoingLongWaveRadiation = netOutGoingLongWaveRadiation;
        }
Esempio n. 2
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double diffusionLimitedEvaporation = s.diffusionLimitedEvaporation;
            double energyLimitedEvaporation    = s.energyLimitedEvaporation;
            double soilEvaporation;

            soilEvaporation   = Math.Min(diffusionLimitedEvaporation, energyLimitedEvaporation);
            a.soilEvaporation = soilEvaporation;
        }
Esempio n. 3
0
 public void Estimate(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.Energybalance s1, SiriusQualityEnergybalance.EnergybalanceRAte r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex, CRA.AgroManagement.ActEvents actevents)
 {
     try
     {
         CalculateModel(s, s1, r, a, ex)
     }
     catch (Exception exception)
     {
         string msg = "Error in component SiriusQualityEnergybalance, strategy: " + this.GetType().Name + ": Unhandled exception running model. " + exception.GetType().FullName + " - " + exception.Message;
         throw new Exception(msg, exception);
     }
 }
Esempio n. 4
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double netRadiationEquivalentEvaporation = a.netRadiationEquivalentEvaporation;
            double soilHeatFlux           = r.soilHeatFlux;
            double potentialTranspiration = r.potentialTranspiration;
            double cropHeatFlux;

            cropHeatFlux   = netRadiationEquivalentEvaporation - soilHeatFlux - potentialTranspiration;
            r.cropHeatFlux = cropHeatFlux;
        }
Esempio n. 5
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double evapoTranspirationPriestlyTaylor = r.evapoTranspirationPriestlyTaylor;
            double energyLimitedEvaporation;
            double AlphaE;

            if (tau < tauAlpha)
            {
                AlphaE = 1.0d;
            }
            else
            {
                AlphaE = Alpha - ((Alpha - 1.0d) * (1.0d - tau) / (1.0d - tauAlpha));
            }
            energyLimitedEvaporation   = evapoTranspirationPriestlyTaylor / Alpha * AlphaE * tau;
            a.energyLimitedEvaporation = energyLimitedEvaporation;
        }
Esempio n. 6
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double plantHeight = a.plantHeight;
            double wind        = a.wind;
            double conductance;
            double h;

            h             = Math.Max(10.0d, plantHeight) / 100.0d;
            conductance   = wind * Math.Pow(vonKarman, 2) / (Math.Log((heightWeatherMeasurements - (d * h)) / (zm * h)) * Math.Log((heightWeatherMeasurements - (d * h)) / (zh * h)));
            s.conductance = conductance;
        }
Esempio n. 7
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double deficitOnTopLayers = a.deficitOnTopLayers;
            double diffusionLimitedEvaporation;

            if (deficitOnTopLayers / 1000.0d <= 0.0d)
            {
                diffusionLimitedEvaporation = 8.3d * 1000.0d;
            }
            else
            {
                if (deficitOnTopLayers / 1000.0d < 25.0d)
                {
                    diffusionLimitedEvaporation = 2.0d * soilDiffusionConstant * soilDiffusionConstant / (deficitOnTopLayers / 1000.0d) * 1000.0d;
                }
                else
                {
                    diffusionLimitedEvaporation = 0.0d;
                }
            }
            s.diffusionLimitedEvaporation = diffusionLimitedEvaporation;
        }
Esempio n. 8
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double netRadiationEquivalentEvaporation = s.netRadiationEquivalentEvaporation;
            double hslope = a.hslope;
            double evapoTranspirationPriestlyTaylor;

            evapoTranspirationPriestlyTaylor   = Math.Max(Alpha * hslope * netRadiationEquivalentEvaporation / (hslope + psychrometricConstant), 0.0d);
            r.evapoTranspirationPriestlyTaylor = evapoTranspirationPriestlyTaylor;
        }
Esempio n. 9
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double evapoTranspirationPriestlyTaylor = r.evapoTranspirationPriestlyTaylor;
            double evapoTranspirationPenman         = r.evapoTranspirationPenman;
            double evapoTranspiration;

            if (isWindVpDefined == 1)
            {
                evapoTranspiration = evapoTranspirationPenman;
            }
            else
            {
                evapoTranspiration = evapoTranspirationPriestlyTaylor;
            }
            r.evapoTranspiration = evapoTranspiration;
        }
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double netRadiation = s.netRadiation;
            double netRadiationEquivalentEvaporation;

            netRadiationEquivalentEvaporation   = netRadiation / lambdaV * 1000.0d;
            a.netRadiationEquivalentEvaporation = netRadiationEquivalentEvaporation;
        }
Esempio n. 11
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double minTair      = a.minTair;
            double maxTair      = a.maxTair;
            double cropHeatFlux = r.cropHeatFlux;
            double conductance  = s.conductance;
            double minCanopyTemperature;
            double maxCanopyTemperature;

            minCanopyTemperature   = minTair + (cropHeatFlux / (rhoDensityAir * specificHeatCapacityAir * conductance / lambdaV * 1000.0d));
            maxCanopyTemperature   = maxTair + (cropHeatFlux / (rhoDensityAir * specificHeatCapacityAir * conductance / lambdaV * 1000.0d));
            s.minCanopyTemperature = minCanopyTemperature;
            s.maxCanopyTemperature = maxCanopyTemperature;
        }
Esempio n. 12
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double evapoTranspirationPriestlyTaylor = r.evapoTranspirationPriestlyTaylor;
            double hslope      = a.hslope;
            double VPDair      = a.VPDair;
            double conductance = s.conductance;
            double evapoTranspirationPenman;

            evapoTranspirationPenman   = evapoTranspirationPriestlyTaylor / Alpha + (1000.0d * (rhoDensityAir * specificHeatCapacityAir * VPDair * conductance / (lambdaV * (hslope + psychrometricConstant))));
            r.evapoTranspirationPenman = evapoTranspirationPenman;
        }
Esempio n. 13
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double evapoTranspiration = r.evapoTranspiration;
            double potentialTranspiration;

            potentialTranspiration   = evapoTranspiration * (1.0d - tau);
            r.potentialTranspiration = potentialTranspiration;
        }
Esempio n. 14
0
        private void  CalculateModel(SiriusQualityEnergybalance.EnergybalanceState s, SiriusQualityEnergybalance.EnergybalanceState s1, SiriusQualityEnergybalance.EnergybalanceRate r, SiriusQualityEnergybalance.EnergybalanceAuxiliary a, SiriusQualityEnergybalance.EnergybalanceExogenous ex)
        {
            double netRadiationEquivalentEvaporation = s.netRadiationEquivalentEvaporation;
            double soilEvaporation = s.soilEvaporation;
            double soilHeatFlux;

            soilHeatFlux   = tau * netRadiationEquivalentEvaporation - soilEvaporation;
            r.soilHeatFlux = soilHeatFlux;
        }