Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller fixes #39

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions SVSModel/Configuration/CropParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace SVSModel.Configuration
/// </summary>
public class CropParams
{
public string EndUse { get; private set; }
public double TypicalYield { get; private set; }
public double TypicalYield_kgPerHa
{
Expand Down Expand Up @@ -41,6 +42,7 @@ public double TypicalYield_kgPerHa

public CropParams(Dictionary<string, object> c)
{
EndUse = c["EndUse"].ToString();
TypicalYield = Functions.Num(c["Typical Yield"]);
TypicalYieldUnits = c["Typical Yield Units"].ToString();
YieldType = c["Yield type"].ToString();
Expand Down
7 changes: 4 additions & 3 deletions SVSModel/Configuration/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ public static Dictionary<DateTime, double> AccumulateTt(DateTime[] dates, Dictio
Dictionary<DateTime, double> tt = new Dictionary<DateTime, double>();
foreach (DateTime d in dates)
{
if (d == dates[0]) // if today is the first day the above will throw
double todayTt = Math.Max(0,Tt[d] - 5);
if (d == dates[0]) // if today is the first day the below will throw
{
tt.Add(d, Tt[d]);
tt.Add(d, todayTt);
}
else
{
tt.Add(d, tt[d.AddDays(-1)] + Tt[d]);
tt.Add(d, tt[d.AddDays(-1)] + todayTt);
}
}
return tt;
Expand Down
44 changes: 22 additions & 22 deletions SVSModel/Data/CropCoefficientTableFull.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Chickpea Grain General,16,Grain,Pulse,Chickpea,General,Fabaceae ,Cicer,arietinum
Lentil Grain General,19,Grain,Pulse,Lentil,General,Fabaceae ,Lens,culinaris,,Lens culinaris ,culinaris ,Seed,Oct,Maturity,Mar,3.5,t/ha,Saleable grain ,1,Total,0,0,0.3,0,14,0.1,1,1,1,1.5,1.6,3.5
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.3,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,5.5,t/ha,Saleable grain ,1,Total,0,0,0.3,0,14,0.1,0.7,1,1,1.5,1.6,3.5
Oat Green manure General,71,Green manure,Green manure,Oat,General,Poaceae ,Avena,sativa,,Avena sativa ,sativa ,Seed,Apr,Maturity,Sep,6,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.5,1,1,0.9,1.5,1.5
Rape Green manure General,72,Green manure,Green manure,Rape,General,Brassicaceae,Brassica,napus,napus,Brassica napus napus,napus napus,Seed,Apr,LateReproductive,Sep,4,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.2,1,1.6,0.8,2.5,2.5
Turnip Green manure General,73,Green manure,Green manure,Turnip,General,Brassicaceae,Brassica,rapa,rapa,Brassica rapa rapa,rapa rapa,Seed,Apr,EarlyReproductive,Sep,8,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.2,1,2,0.8,2,2
Lupin Green manure General,74,Green manure,Green manure,Lupin,General,Fabaceae ,Lupinus,angustifolius,,Lupinus angustifolius ,angustifolius ,Seed,Apr,EarlyReproductive,Sep,12,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.5,1,1,1.5,1.6,1.6
Phacelia Green manure General,75,Green manure,Green manure,Phacelia,General,Boraginaceae ,Phacelia,tanacetifolia,,Phacelia tanacetifolia ,tanacetifolia ,Seed,Apr,Vegetative,Sep,5,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1,1,1,0.9,2,2
Rye corn Green manure General,76,Green manure,Green manure,Rye corn,General,Poaceae ,Secale,cereale,,Secale cereale ,cereale ,Seed,Apr,EarlyReproductive,Sep,8,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.5,1,1,0.9,1.4,1.4
Mustard Green manure General,77,Green manure,Green manure,Mustard,General,Brassicaceae,Sinapis,alba,,Sinapis alba ,alba ,Seed,Apr,EarlyReproductive,Sep,7,t/ha,Standing DM,1,Dry,0,0,1,0,0,0.1,1.2,1,1.1,0.8,2,2
Oat Green manure General,71,Green manure,Green manure,Oat,General,Poaceae ,Avena,sativa,,Avena sativa ,sativa ,Seed,Apr,Maturity,Sep,6,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.5,1,1,0.9,1.5,1.5
Rape Green manure General,72,Green manure,Green manure,Rape,General,Brassicaceae,Brassica,napus,napus,Brassica napus napus,napus napus,Seed,Apr,LateReproductive,Sep,4,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.2,1,1.6,0.8,2.5,2.5
Turnip Green manure General,73,Green manure,Green manure,Turnip,General,Brassicaceae,Brassica,rapa,rapa,Brassica rapa rapa,rapa rapa,Seed,Apr,EarlyReproductive,Sep,8,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.2,1,2,0.8,2,2
Lupin Green manure General,74,Green manure,Green manure,Lupin,General,Fabaceae ,Lupinus,angustifolius,,Lupinus angustifolius ,angustifolius ,Seed,Apr,EarlyReproductive,Sep,12,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.5,1,1,1.5,1.6,1.6
Phacelia Green manure General,75,Green manure,Green manure,Phacelia,General,Boraginaceae ,Phacelia,tanacetifolia,,Phacelia tanacetifolia ,tanacetifolia ,Seed,Apr,Vegetative,Sep,5,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1,1,1,0.9,2,2
Rye corn Green manure General,76,Green manure,Green manure,Rye corn,General,Poaceae ,Secale,cereale,,Secale cereale ,cereale ,Seed,Apr,EarlyReproductive,Sep,8,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.5,1,1,0.9,1.4,1.4
Mustard Green manure General,77,Green manure,Green manure,Mustard,General,Brassicaceae,Sinapis,alba,,Sinapis alba ,alba ,Seed,Apr,EarlyReproductive,Sep,7,t/ha,Standing DM,1,Dry,0,1,1,0,0,0.1,1.2,1,1.1,0.8,2,2
Early harvest Potato Agria,86,Potato,Potato,Early harvest,Agria,Solanaceae,Solanum ,tuberosum,,Solanum tuberosum ,tuberosum ,Seed,Aug,MidReproductive,Jan,60,t/ha,Saleable product ,1,Total,0,0,0.85,0,76,0.1,0.7,1,1.2,0.9,1.15,1.5
Maturity harvest Potato Agria,87,Potato,Potato,Maturity harvest,Agria,Solanaceae,Solanum ,tuberosum,,Solanum tuberosum ,tuberosum ,Seed,Oct,Maturity,Apr,80,t/ha,Saleable product ,1,Total,0,0,0.92,0,79,0.1,0.8,1,1.2,0.9,1.15,1.5
GroundStore Potato Agria,88,Potato,Potato,GroundStore,Agria,Solanaceae,Solanum ,tuberosum,,Solanum tuberosum ,tuberosum ,Seed,Oct,Late,June,80,t/ha,Saleable product ,1,Total,0,0,0.92,0,79,0.1,0.8,1,1.2,0.9,1.15,1.5
Expand Down Expand Up @@ -61,9 +61,9 @@ Maturity harvest Potato Very Long (Group4),111,Potato,Potato,Maturity harvest,Ve
GroundStore Potato Very Long (Group4),112,Potato,Potato,GroundStore,Very Long (Group4),Solanaceae,Solanum ,tuberosum,,Solanum tuberosum ,tuberosum ,Seed,Oct,Late,June,80,t/ha,Saleable product ,1,Total,0,0,0.92,0,79,0.1,0.9,1,1.2,0.9,1.15,1.5
Rape Seed General,27,Seed,Fodder,Rape,General,Brassicaceae,Brassica,napus,napus,Brassica napus napus,napus napus,Seed,Apr,LateReproductive,Feb,4,t/ha,Saleable seed ,1,Total,3,0,0.33,0.08,10,0.1,1.2,1,1.6,0.8,1.8,5
Cocksfoot Seed General,29,Seed,Forage,Cocksfoot,General,Poaceae ,Dactylus,glomerata,,Dactylus glomerata ,glomerata ,Seed,Feb,LateReproductive,Jan,1,t/ha,Saleable seed ,1,Total,10,0,0.09,0.03,15,0.1,1,1,0.8,0.9,1.2,2
Ryegrass Seed General,31,Seed,Forage,Ryegrass,General,Poaceae ,Lolium,perenne,,Lolium perenne ,perenne ,Seed,Apr,LateReproductive,Jan,2.07,t/ha,Saleable seed ,1,Total,15,0,0.2035,0.1035,14,0.1,0.9,1,1.5,0.9,0.9,2
Ryegrass Seed General,31,Seed,Forage,Ryegrass,General,Poaceae ,Lolium,perenne,,Lolium perenne ,perenne ,Seed,Apr,LateReproductive,Jan,2.07,t/ha,Saleable seed ,1,Total,15,0,0.2035,0.1035,14,0.1,0.9,1,1.5,0.9,1.5,2.5
White clover Seed General,33,Seed,Forage,White clover,General,Fabaceae ,Trifolium,repens,,Trifolium repens ,repens ,Seed,Mar,LateReproductive,Feb,0.6,t/ha,Saleable seed ,1,Total,20,0,0.15,0.09,14,0.1,0.9,1,0.6,1.5,4,3
Tall fescue Seed Turf,85,Seed,Forage,Tall fescue,Turf,Tall fescue Seed Turf,Poaceae,Festuca,arundinacea,x,Festuca arundinacea,Seed,May,LateReproductive,Jan,1.8,t/ha,Saleable seed,1,Total,15,5,0.15,0.04,15,0.1,0.6,1,0.7,0.9,0.9,2
Tall fescue Seed Turf,85,Seed,Forage,Tall fescue,Turf,Tall fescue Seed Turf,Poaceae,Festuca,arundinacea,x,Festuca arundinacea,Seed,May,LateReproductive,Jan,1.8,t/ha,Saleable seed,1,Total,15,5,0.15,0.1,15,0.1,0.6,1,0.7,0.9,1.5,2.5
Pumpkin Seed General,84,Seed,Fruit,Pumpkin,General,Cucurbitaceae,Cucurbita,pepo,,Cucurbita pepo ,pepo ,Seed,Oct,LateReproductive,Mar,0.8,t/ha,Saleable product ,1,Total,0,0,0.1,0,14,0.1,0.8,1,1,1,1.4,2
Pak choi Seed General,28,Seed,Vegetable,Pak choi,General,Brassicaceae,Brassica,rapa,chinensis,Brassica rapa chinensis,rapa chinensis,Seed,Sep,LateReproductive,Feb,1.3,t/ha,Saleable seed ,1,Total,0,0,0.245,0.14,8,0.1,1.2,0.85,1.5,0.8,1.1,3.2
Red beet Seed General,26,Seed,Vegetable,Red beet,General,Amaranthaceae ,Beta,vulgaris,conditiva,Beta vulgaris conditiva,vulgaris conditiva,Seed,Apr,LateReproductive,Mar,1.2,t/ha,Saleable seed ,1,Total,15,0,0.17,0.07,15,0.1,1.5,0.85,0.8,0.8,1.8,2.1
Expand All @@ -82,22 +82,22 @@ Zucchini Vegetable General,56,Vegetable,Fruit,Zucchini,General,Cucurbitaceae,Cuc
Tomato Vegetable General,67,Vegetable,Fruit,Tomato,General,Solanaceae,Solanum ,lycopersicum,,Solanum lycopersicum ,lycopersicum ,Seedling,Oct,LateReproductive,Apr,100,t/ha,Saleable product ,1,Total,0,0,0.5,0,95,0.1,0.6,1,1.2,0.9,2,2
Sweetcorn Vegetable General,70,Vegetable,Fruit,Sweetcorn,General,Poaceae ,Zea,mays,,Zea mays ,mays ,Seed,Oct,MidReproductive,Feb,22,t/ha,Saleable product ,1,Total,0,0,0.48,0.02,78,0.1,1.5,0.75,1,0.9,0.9,1.4
Leek Vegetable General,34,Vegetable,Green,Leek,General,Amaryllidaceae,Allium,ampeloprasum,,Allium ampeloprasum ,ampeloprasum ,Seedling,Nov,Vegetative,May,0.5,kg/head,Saleable product ,47000,Total,0,0,0.89,0,89,0.1,0.6,0.75,0.6,1,2.7,2.7
Spring onion Vegetable General,38,Vegetable,Green,Spring onion,General,Amaryllidaceae,Allium,fistulosum,,Allium fistulosum ,fistulosum ,Seed,Feb,Vegetative,Sep,0.07,kg/head,Saleable product ,130000,Total,0,0,1,0,90,0.1,0.6,0.75,0.6,1,2.2,2.2
Celery Vegetable General,40,Vegetable,Green,Celery,General,Apiaceae ,Apium,graveolens,,Apium graveolens ,graveolens ,Seedling,Oct,Vegetative,Jan,0.4,kg/head,Saleable product ,80000,Total,0,0,0.85,0,88,0.1,1.2,1,0.8,0.9,2.5,2.5
Silver beet Vegetable General,41,Vegetable,Green,Silver beet,General,Amaranthaceae ,Beta,vulgaris,cicla,Beta vulgaris cicla,vulgaris cicla,Seedling,Nov,Vegetative,May,0.4,kg/head,Saleable product ,60000,Total,0,0,0.8,0,93,0.1,1.5,0.76,1,0.8,2.5,3
Cauliflower Vegetable General,43,Vegetable,Green,Cauliflower,General,Brassicaceae,Brassica,oleracea,botrytis,Brassica oleracea botrytis,oleracea botrytis,Seedling,Sep,EarlyReproductive,Jan,0.375,kg/head,Saleable product ,60000,Total,0,0,0.5,0,91,0.1,1.2,1,2,0.8,3.8,3.2
Cabbage Vegetable General,44,Vegetable,Green,Cabbage,General,Brassicaceae,Brassica,oleracea,capitata,Brassica oleracea capitata,oleracea capitata,Seedling,Sep,Vegetative,Jan,0.6,kg/head,Saleable product ,50000,Total,0,0,0.7,0,90,0.1,1.2,1,2,0.8,3,2.6
Brussel sprout Vegetable General,45,Vegetable,Green,Brussel sprout ,General,Brassicaceae,Brassica,oleracea,gemmifera,Brassica oleracea gemmifera,oleracea gemmifera,Seedling,Nov,EarlyReproductive,Jun,0.3,kg/head,Saleable product ,50000,Total,0,0,0.4,0,80,0.1,1.2,1,2,0.8,3.8,2.6
Broccoli Vegetable Head only,46,Vegetable,Green,Broccoli,Head only,Brassicaceae,Brassica,oleracea,italica,Brassica oleracea italica,oleracea italica,Seedling,May,EarlyReproductive,Sep,0.3,kg/head,Saleable product ,50000,Total,0,0,0.3,0,89,0.1,1.2,0.9,2,0.8,3.4,4.6
Broccoli Vegetable Chinese cut,47,Vegetable,Green,Broccoli,Chinese cut,Brassicaceae,Brassica,oleracea,italica,Brassica oleracea italica,oleracea italica,Seedling,May,EarlyReproductive,Sep,0.5,kg/head,Saleable product ,50000,Total,0,0,0.5,0,89,0.1,1.2,1,2,0.8,3.6,3.6
Spring onion Vegetable General,38,Vegetable,Green,Spring onion,General,Amaryllidaceae,Allium,fistulosum,,Allium fistulosum ,fistulosum ,Seed,Feb,Vegetative,Sep,0.25,kg/head,Saleable product ,130000,Total,0,0,1,0,90,0.1,0.6,0.75,0.6,1,2.2,2.2
Celery Vegetable General,40,Vegetable,Green,Celery,General,Apiaceae ,Apium,graveolens,,Apium graveolens ,graveolens ,Seedling,Oct,Vegetative,Jan,0.7,kg/head,Saleable product ,80000,Total,0,0,0.85,0,88,0.1,1.2,1,0.8,0.9,2.5,2.5
Silver beet Vegetable General,41,Vegetable,Green,Silver beet,General,Amaranthaceae ,Beta,vulgaris,cicla,Beta vulgaris cicla,vulgaris cicla,Seedling,Nov,Vegetative,May,0.6,kg/head,Saleable product ,60000,Total,0,0,0.8,0,93,0.1,1.5,0.76,1,0.8,2.5,3
Cauliflower Vegetable General,43,Vegetable,Green,Cauliflower,General,Brassicaceae,Brassica,oleracea,botrytis,Brassica oleracea botrytis,oleracea botrytis,Seedling,Sep,EarlyReproductive,Jan,0.6,kg/head,Saleable product ,60000,Total,0,0,0.5,0.15,91,0.1,1.2,1,2,0.8,3.8,3.2
Cabbage Vegetable General,44,Vegetable,Green,Cabbage,General,Brassicaceae,Brassica,oleracea,capitata,Brassica oleracea capitata,oleracea capitata,Seedling,Sep,Vegetative,Jan,0.5,kg/head,Saleable product ,50000,Total,0,0,0.7,0,90,0.1,1.2,1,2,0.8,3,2.6
Brussel sprout Vegetable General,45,Vegetable,Green,Brussel sprout ,General,Brassicaceae,Brassica,oleracea,gemmifera,Brassica oleracea gemmifera,oleracea gemmifera,Seedling,Nov,EarlyReproductive,Jun,0.3,kg/head,Saleable product ,50000,Total,0,0,0.4,0.05,80,0.1,1.2,1,2,0.8,3.8,2.6
Broccoli Vegetable Head only,46,Vegetable,Green,Broccoli,Head only,Brassicaceae,Brassica,oleracea,italica,Brassica oleracea italica,oleracea italica,Seedling,May,EarlyReproductive,Sep,0.3,kg/head,Saleable product ,50000,Total,0,0,0.3,0.1,89,0.1,1.2,0.9,2,0.8,3.4,4.6
Broccoli Vegetable Chinese cut,47,Vegetable,Green,Broccoli,Chinese cut,Brassicaceae,Brassica,oleracea,italica,Brassica oleracea italica,oleracea italica,Seedling,May,EarlyReproductive,Sep,0.5,kg/head,Saleable product ,50000,Total,0,0,0.5,0.1,89,0.1,1.2,1,2,0.8,3.6,3.6
Pak choi Vegetable General,48,Vegetable,Green,Pak choi,General,Brassicaceae,Brassica,rapa,chinensis,Brassica rapa chinensis,rapa chinensis,Seedling,May,Vegetative,Aug,0.15,kg/head,Saleable product ,300000,Total,0,0,0.8,0,95,0.1,1.2,0.8,1.5,0.8,4,3.8
Choy sum Vegetable General,49,Vegetable,Green,Choy sum,General,Brassicaceae,Brassica,rapa,parachinensis,Brassica rapa parachinensis,rapa parachinensis,Seedling,May,Vegetative,Sep,0.2,kg/head,Saleable product ,120000,Total,0,0,0.85,0,90,0.1,1.2,0.9,2,0.8,4.5,4.8
Wong bok Vegetable General,50,Vegetable,Green,Wong bok,General,Brassicaceae,Brassica,rapa,pekinensis,Brassica rapa pekinensis,rapa pekinensis,Seedling,Dec,Vegetative,Jun,0.5,kg/head,Saleable product ,60000,Total,0,0,0.8,0,90,0.1,1.2,0.9,2,0.8,3,3
Coriander Vegetable General,51,Vegetable,Green,Coriander,General,Apiaceae ,Coriandrum,sativum,,Coriandrum sativum ,sativum ,Seed,May,Vegetative,Sep,0.1,kg/head,Saleable product ,120000,Total,0,0,1,0,95,0.1,1.2,0.9,0.8,0.9,4.7,4.7
Lettuce Vegetable Ice berg,61,Vegetable,Green,Lettuce,Ice berg,Asteraceae ,Lactuca,sativa,,Lactuca sativa ,sativa ,Seedling,Sep,Vegetative,Dec,0.4,kg/head,Saleable product ,70000,Total,0,0,0.8,0,96,0.1,1,0.95,1,0.9,3.5,3.5
Lettuce Vegetable Leafy-salad,62,Vegetable,Green,Lettuce,Leafy-salad,Asteraceae ,Lactuca,sativa,,Lactuca sativa ,sativa ,Seedling,Sep,Vegetative,Dec,0.3,kg/head,Saleable product ,80000,Total,0,0,0.9,0,95,0.1,1,0.9,1,0.9,3.8,1.5
Spinach Vegetable General,68,Vegetable,Green,Spinach,General,Amaranthaceae ,Spinacia,loeracea,,Spinacia loeracea ,loeracea ,Seed,May,Vegetative,Sep,0.1,kg/head,Saleable product ,200000,Total,0,0,0.95,0,92,0.1,1.5,0.8,1,0.8,4,4.5
Parsley Vegetable General,83,Vegetable,Green,Parsley,General,Apiaceae,Petroselinum,crispum,,Petroselinum crispum,crispum,Seed,May,Vegetative,Sep,0.1,kg/head,Saleable product ,100000,Total,0,0,0.7,0,92,0.1,1.5,0.8,1,0.8,4,4.5
Coriander Vegetable General,51,Vegetable,Green,Coriander,General,Apiaceae ,Coriandrum,sativum,,Coriandrum sativum ,sativum ,Seed,May,Vegetative,Sep,0.3,kg/head,Saleable product ,120000,Total,0,0,1,0,95,0.1,1.2,0.9,0.8,0.9,4.7,4.7
Lettuce Vegetable Ice berg,61,Vegetable,Green,Lettuce,Ice berg,Asteraceae ,Lactuca,sativa,,Lactuca sativa ,sativa ,Seedling,Sep,Vegetative,Dec,0.8,kg/head,Saleable product ,70000,Total,0,0,0.8,0,96,0.1,1,0.95,1,0.9,3.5,3.5
Lettuce Vegetable Leafy-salad,62,Vegetable,Green,Lettuce,Leafy-salad,Asteraceae ,Lactuca,sativa,,Lactuca sativa ,sativa ,Seedling,Sep,Vegetative,Dec,0.7,kg/head,Saleable product ,80000,Total,0,0,0.9,0,95,0.1,1,0.9,1,0.9,3.8,3.5
Spinach Vegetable General,68,Vegetable,Green,Spinach,General,Amaranthaceae ,Spinacia,loeracea,,Spinacia loeracea ,loeracea ,Seed,May,Vegetative,Sep,0.3,kg/head,Saleable product ,200000,Total,0,0,0.95,0,92,0.1,1.5,0.8,1,0.8,4,4.5
Parsley Vegetable General,83,Vegetable,Green,Parsley,General,Apiaceae,Petroselinum,crispum,,Petroselinum crispum,crispum,Seed,May,Vegetative,Sep,0.3,kg/head,Saleable product ,100000,Total,0,0,0.7,0,92,0.1,1.5,0.8,1,0.8,4,4.5
Bean Vegetable General,65,Vegetable,Pulse,Bean,General,Fabaceae ,Phaseolus,vulgaris,,Phaseolus vulgaris ,vulgaris ,Seed,Nov,EarlyReproductive,Mar,18,t/ha,Saleable product ,1,Total,0,0,0.44,0.07,89,0.1,1,0.9,1,1.5,2.5,2.8
Pea Vegetable General,66,Vegetable,Pulse,Pea,General,Fabaceae ,Pisum,sativum,,Pisum sativum ,sativum ,Seed,Aug,EarlyReproductive,Jan,10,t/ha,Saleable product ,1,Total,0,0,0.34,0.08,77,0.1,0.7,1,1,1.5,2.1,4
Broad bean Vegetable General,69,Vegetable,Pulse,Broad bean,General,Fabaceae ,Vicia,faba,,Vicia faba ,faba ,Seed,May,EarlyReproductive,Nov,11,t/ha,Saleable product ,1,Total,0,0,0.3,0.05,76,0.1,1,0.9,1,1.5,1.7,4.4
Expand Down
32 changes: 16 additions & 16 deletions SVSModel/Data/CropCoefficients.ipynb

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions SVSModel/Models/Crop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,26 @@ public static CropType Grow(Dictionary<DateTime, double> tt,
thisCrop.T_sen = Constants.PropnTt["MidReproductive"] * thisCrop.T_mat;
thisCrop.Xo_cov = thisCrop.Xo_Biomass * 0.4 / cropParams.rCover;
thisCrop.b_cov = thisCrop.Xo_cov * 0.2;
thisCrop.typicalYield = cropParams.TypicalYield * Constants.UnitConversions[cropParams.TypicalYieldUnits];
if (cropParams.TypicalYieldUnits == "kg/head")
{
thisCrop.typicalYield = cropParams.TypicalYield * cropParams.TypicalPopulation;
}
else
{
thisCrop.typicalYield = cropParams.TypicalYield * Constants.UnitConversions[cropParams.TypicalYieldUnits];
}
thisCrop.fFieldLossPct = cf.FieldLoss;
if (cropParams.EndUse == "Green manure")
{
thisCrop.fFieldLossPct = 100; //Set field loss to 100% for green manure crops so biomass is all returned as residual
}
thisCrop.fTotalProductFwt = cf.FieldYield; // Assuming Field yield is always entered as gross yield assumng no loss
thisCrop.a_harvestIndex = cropParams.TypicalHI - cropParams.HIRange;
thisCrop.b_harvestIndex = cropParams.HIRange / thisCrop.typicalYield;
thisCrop.stageCorrection = 1 / Constants.PropnMaxDM[cf.HarvestStage];

// derive crop Harvest State Variables
thisCrop.fFieldLossPct = cf.FieldLoss;
thisCrop.fTotalProductFwt = cf.FieldYield * (1 / (1 - thisCrop.fFieldLossPct / 100));

thisCrop.HI = thisCrop.a_harvestIndex + thisCrop.fTotalProductFwt * thisCrop.b_harvestIndex;
if (cropParams.YieldType == "Standing DM")
{
Expand Down Expand Up @@ -127,7 +139,7 @@ public static CropParams ExtractCropParams(string crop, DataFrame allCropParams)
cropRow += 1;
}

List<string> coeffs = new List<string> { "Typical Yield","Typical Yield Units","Yield type","Typical Population (/ha)",
List<string> coeffs = new List<string> { "EndUse", "Typical Yield","Typical Yield Units","Yield type","Typical Population (/ha)",
"TotalOrDry","Typical Dressing Loss %","Typical Field Loss %","Typical HI",
"HI Range","Moisture %","P Root","Max RD","A cover","rCover","Root [N]",
"Stover [N]","Product [N]" };
Expand Down
Loading
Loading