fix for fodder_maize
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
This commit is contained in:
@@ -568,9 +568,9 @@ namespace FarmMapsAPI.Carbon
|
||||
var valueList = new List<ColumnValue>();
|
||||
foreach (var stubbleKeyValue in stubbleC.Value)
|
||||
{
|
||||
var dmYieldValue = dm_Yield_Field[stubbleC.Key].Single(s => s.Key == stubbleKeyValue.Key);
|
||||
var strawYieldValue = strawYield[stubbleC.Key].Single(s => s.Key == stubbleKeyValue.Key);
|
||||
var dmContentStraw = cropSet.StrawCrops.Single(s => s.StrawCrop == stubbleKeyValue.Key);
|
||||
var dmYieldValue = dm_Yield_Field[stubbleC.Key].Single(s => s.Key.ToLower() == stubbleKeyValue.Key.ToLower());
|
||||
var strawYieldValue = strawYield[stubbleC.Key].Single(s => s.Key.ToLower() == stubbleKeyValue.Key.ToLower());
|
||||
var dmContentStraw = cropSet.StrawCrops.Single(s => s.StrawCrop.ToLower() == stubbleKeyValue.Key.ToLower());
|
||||
|
||||
var result = ((dmYieldValue.Value + ((stubbleKeyValue.Value + strawYieldValue.Value) * dmContentStraw.DM_Content)) * parameterSet.CarbonBiomass) / ((1 / parameterSet.FracBelowGroundCinput) - 1);
|
||||
valueList.Add(new ColumnValue(stubbleKeyValue.Key, result));
|
||||
@@ -613,7 +613,7 @@ namespace FarmMapsAPI.Carbon
|
||||
{
|
||||
result = 12000;
|
||||
}
|
||||
carbonInputs.AddValue((cropArea.Key.Item1, cropArea.Key.Item2, crop.Key), "CarbonResidues", result);
|
||||
carbonInputs.AddOrUpdateValue((cropArea.Key.Item1, cropArea.Key.Item2, crop.Key), "CarbonResidues", result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user