/// <summary> /// Method to perform calculation of all ecological indicators. /// </summary> private void CalculateEcologicalIndicators() { //If it is time to do yearly calculation if (zoneCLEM.IsEcologicalIndicatorsCalculationMonth()) { // Calculate change in Land Condition index and Grass basal area double utilisation = LinkedNativeFoodType.PercentUtilisation; LandConditionIndex.Modify(utilisation); LinkedNativeFoodType.CurrentEcologicalIndicators.LandConditionIndex = LandConditionIndex.Value; GrassBasalArea.Modify(utilisation); LinkedNativeFoodType.CurrentEcologicalIndicators.GrassBasalArea = GrassBasalArea.Value; // Calculate average monthly stocking rate // Check number of months to use int monthdiff = ((zoneCLEM.EcologicalIndicatorsNextDueDate.Year - clock.StartDate.Year) * 12) + zoneCLEM.EcologicalIndicatorsNextDueDate.Month - clock.StartDate.Month + 1; if (monthdiff >= zoneCLEM.EcologicalIndicatorsCalculationInterval) { monthdiff = zoneCLEM.EcologicalIndicatorsCalculationInterval; } LinkedNativeFoodType.CurrentEcologicalIndicators.StockingRate = stockingRateSummed / monthdiff; //perennials LinkedNativeFoodType.CurrentEcologicalIndicators.Perennials = 92.2 * (1 - Math.Pow(LandConditionIndex.Value, 3.35) / Math.Pow(LandConditionIndex.Value, 3.35 + 137.7)) - 2.2; //%utilisation LinkedNativeFoodType.CurrentEcologicalIndicators.Utilisation = utilisation; // Reset running total for stocking rate stockingRateSummed = 0; // calculate averages LinkedNativeFoodType.CurrentEcologicalIndicators.Cover /= monthdiff; LinkedNativeFoodType.CurrentEcologicalIndicators.TreeBasalArea /= monthdiff; //TreeC // I didn't include the / area as tba is already per ha. I think NABSA has this wrong LinkedNativeFoodType.CurrentEcologicalIndicators.TreeCarbon = LinkedNativeFoodType.CurrentEcologicalIndicators.TreeBasalArea * 6286 * 0.46; //methane //soilC //Burnkg //methaneFire //N2OFire //Get the new Pasture Data using the new Ecological Indicators (ie. GrassBA, LandCon, StRate) GetPastureDataList_TodayToNextEcolCalculation(); } }
/// <summary> /// Method to perform calculation of all ecological indicators. /// </summary> private void CalculateEcologicalIndicators() { //If it is time to do yearly calculation if (ZoneCLEM.IsEcologicalIndicatorsCalculationMonth()) { // Calculate change in Land Condition index and Grass basal area double utilisation = LinkedNativeFoodType.PercentUtilisation; LandConditionIndex.Modify(utilisation); LinkedNativeFoodType.CurrentEcologicalIndicators.LandConditionIndex = LandConditionIndex.Value; GrassBasalArea.Modify(utilisation); LinkedNativeFoodType.CurrentEcologicalIndicators.GrassBasalArea = GrassBasalArea.Value; // Calculate average monthly stocking rate // Check number of months to use int monthdiff = ((ZoneCLEM.EcologicalIndicatorsNextDueDate.Year - Clock.StartDate.Year) * 12) + ZoneCLEM.EcologicalIndicatorsNextDueDate.Month - Clock.StartDate.Month; if (monthdiff >= ZoneCLEM.EcologicalIndicatorsCalculationInterval) { monthdiff = ZoneCLEM.EcologicalIndicatorsCalculationInterval; } LinkedNativeFoodType.CurrentEcologicalIndicators.StockingRate = StockingRateSummed / monthdiff; //erosion //tree basal area //perennials Perennials = 92.2 * (1 - Math.Pow(LandConditionIndex.Value, 3.35) / Math.Pow(LandConditionIndex.Value, 3.35 + 137.7)) - 2.2; //%runoff //methane //soilC //TreeC //Burnkg //methaneFire //NOxFire //%utilisation LinkedNativeFoodType.CurrentEcologicalIndicators.Utilisation = utilisation; // Reset running total for stocking rate StockingRateSummed = 0; //Get the new Pasture Data using the new Ecological Indicators (ie. GrassBA, LandCon, StRate) GetPastureDataList_TodayToNextEcolCalculation(); } }