Skip to content

Commit

Permalink
Merge pull request #25 from HamishBrownPFR/SmallerFixes
Browse files Browse the repository at this point in the history
Smaller fixes

@Nibble-Byte please not I have added the weather station name into the interface.  This is because the loss model has coefficients fitted for each weather station so it needs to know which weather station is being used.
  • Loading branch information
HamishBrownPFR authored Apr 1, 2024
2 parents a522b3c + 181c3f4 commit d741b2c
Show file tree
Hide file tree
Showing 34 changed files with 10,364 additions and 6 deletions.
Binary file modified Prototype_V3.4.xlsm
Binary file not shown.
2 changes: 2 additions & 0 deletions SVSModel.Tests/Configuration/FieldConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace SVSModel.Tests.Configuration;

public class FieldConfigTests
{
private static readonly string WeatherStation = Defaults.WeatherStation;
private static readonly string SoilCategory = Defaults.SoilCategory;
private static readonly string Texture = Defaults.SoilTexture;
private static readonly double PMN = Defaults.PMN;
Expand All @@ -23,6 +24,7 @@ public class FieldConfigTests

private readonly Dictionary<string, object> ExcelInputDict = new()
{
{ "WeatherStation", WeatherStation },
{ "SoilCategory", SoilCategory },
{ "Texture", Texture },
{ "PMN", PMN },
Expand Down
3 changes: 2 additions & 1 deletion SVSModel/Configuration/FieldConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace SVSModel.Configuration
public class FieldConfig
{
// Inputs
public string WeatherStation { get; init; }
public string SoilCategory { get; init; }
public string SoilTexture { get; init; }
public double PMN { get; init; }
Expand Down Expand Up @@ -44,7 +45,7 @@ public FieldConfig() { }
public FieldConfig(Dictionary<string, object> c)
{
// Only raw input values should be set in here

WeatherStation = c["WeatherStation"].ToString();
SoilCategory = c["SoilCategory"].ToString();
SoilTexture = c["Texture"].ToString();
PMN = Functions.Num(c["PMN"]);
Expand Down
2 changes: 1 addition & 1 deletion SVSModel/Data/CropCoefficientTableFull.csv
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Lentil Grain General,19,Grain,Pulse,Lentil,General,Fabaceae ,Lens,culinaris,,Len
Linseed Grain General,20,Grain,Oilseed,Linseed,General,Linaceae ,Linum,usitatissimum,,Linum usitatissimum ,usitatissimum ,Seed,Sep,LateReproductive,Mar,2.5,t/ha,Saleable grain ,1,Total,0,0,0.208333333,0,9,0.1,1,1,1,1,1,4.3
Bean Grain General,21,Grain,Pulse,Bean,General,Fabaceae ,Phaseolus,vulgaris,,Phaseolus vulgaris ,vulgaris ,Seed,Oct,Maturity,Mar,3.5,t/ha,Saleable grain ,1,Total,0,0,0.5,0,14,0.1,1,1,1,1.5,1.6,3.5
Pea Grain General,22,Grain,Pulse,Pea,General,Fabaceae ,Pisum,sativum,,Pisum sativum ,sativum ,Seed,Oct,Maturity,Mar,3.5,t/ha,Saleable grain ,1,Total,0,0,0.3,0,14,0.1,0.7,1,1,1.5,1.6,4.7
Wheat Grain Breed,23,Grain,Cereal,Wheat,Breed,Poaceae ,Triticum,astevium,,Triticum astevium ,astevium ,Seed,Apr,Maturity,Feb,10,t/ha,Saleable grain ,1,Total,0,0,0.4117,0.1,13,0.1,1.5,1,1,0.9,0.5,1.5
Wheat Grain Breed,23,Grain,Cereal,Wheat,Bread,Poaceae ,Triticum,astevium,,Triticum astevium ,astevium ,Seed,Apr,Maturity,Feb,10,t/ha,Saleable grain ,1,Total,0,0,0.4117,0.1,13,0.1,1.5,1,1,0.9,0.5,1.5
Wheat Grain Feed,24,Grain,Cereal,Wheat,Feed,Poaceae ,Triticum,astevium,,Triticum astevium ,astevium ,Seed,Apr,Maturity,Feb,12,t/ha,Saleable grain ,1,Total,0,0,0.4117,0.1,13,0.1,1.5,1,1,0.9,0.5,1.2
Wheat Grain General,24,Grain,Cereal,Wheat,General,Poaceae ,Triticum,astevium,,Triticum astevium ,astevium ,Seed,Apr,Maturity,Feb,12,t/ha,Saleable grain ,1,Total,0,0,0.4117,0.1,13,0.1,1.5,1,1,0.9,0.5,1.2
Maize Grain General,25,Grain,Cereal,Maize,General,Poaceae ,Zea,mays,,Zea mays ,mays ,Seed,Oct,Maturity,Apr,13.3,t/ha,Saleable grain ,1,Total,0,0,0.5,0,13,0.1,1.5,0.85,1,0.9,0.7,1.4
Expand Down
Loading

0 comments on commit d741b2c

Please sign in to comment.