return crop name; scenario name
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:
@@ -224,7 +224,7 @@ namespace FarmMapsAPI.Carbon
|
||||
}
|
||||
|
||||
public CarbonSummary Calculate(CarbonRequest farmInput)
|
||||
{
|
||||
{
|
||||
var knmiFile = Helper.GetPlatformIndependentDirectoryPath(Path.Combine(configPath, "KNMI_data.csv"));
|
||||
|
||||
// soilTypeData (external input)
|
||||
@@ -685,7 +685,7 @@ namespace FarmMapsAPI.Carbon
|
||||
}
|
||||
tempModFactor.Add(climateVar.Key, valueList);
|
||||
}
|
||||
|
||||
|
||||
// CoverModFactor
|
||||
// input sheet
|
||||
var coverModFactor = new Dictionary<string, List<ColumnValue>>();
|
||||
@@ -1328,7 +1328,7 @@ namespace FarmMapsAPI.Carbon
|
||||
// DPMss
|
||||
// RPMss
|
||||
// IOMss
|
||||
|
||||
|
||||
var dpmSs = new Dictionary<(string, int), List<ColumnValue>>();
|
||||
var rpmSs = new Dictionary<(string, int), List<ColumnValue>>();
|
||||
var iomSs = new Dictionary<(string, int), List<ColumnValue>>();
|
||||
@@ -1561,6 +1561,13 @@ namespace FarmMapsAPI.Carbon
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in socIni)
|
||||
{
|
||||
var crpField = cropFieldSummary.Single(x => x.Name == item.Key.Item1);
|
||||
var summary = crpField.Summary.Single(x => x.Year == item.Key.Item2);
|
||||
summary.Crop = item.Value[0].Key;
|
||||
}
|
||||
|
||||
foreach (var item in soc_Summary)
|
||||
{
|
||||
var balanceValue = item.Value.SingleOrDefault(x => x.Key == "Balance")?.Value ?? 0;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.1.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -23,6 +23,8 @@ namespace FarmMapsAPI.Carbon.Models
|
||||
|
||||
public class YearSummary
|
||||
{
|
||||
[JsonProperty("crop")]
|
||||
public string Crop { get; set; }
|
||||
[JsonProperty("year")]
|
||||
public int Year { get; set; }
|
||||
[JsonProperty("bulk_Density")]
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace FarmMapsAPI.Carbon.Models
|
||||
{
|
||||
public class FarmMapsCarbonRequest
|
||||
{
|
||||
public string ScenarioName { get; set; }
|
||||
public int PostalCode { get; set; }
|
||||
|
||||
public List<CropFieldFarmMaps> CropFields { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user