Skip to content

Commit

Permalink
Remove redundant method
Browse files Browse the repository at this point in the history
  • Loading branch information
HamishBrownPFR committed May 28, 2024
1 parent d1a3d39 commit dc71bb9
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions SVSModel/Models/SoilNitrogen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,6 @@ namespace SVSModel.Models
{
public class SoilNitrogen
{
/// <summary>
/// Calculates soil mineral nitrogen from an assumed initial value and modeled crop uptake and mineralisation from residues and soil organic matter
/// </summary>
/// <param name="uptake">series of daily N uptake values over the duration of the rotatoin</param>
/// <param name="residue">series of mineral N released daily to the soil from residue mineralisation</param>
/// <param name="som">series of mineral N released daily to the soil from organic matter</param>
/// <returns>date indexed series of estimated soil mineral N content</returns>
public static Dictionary<DateTime, double> InitialBalance(
Dictionary<DateTime, double> uptake,
Dictionary<DateTime, double> residue,
Dictionary<DateTime, double> som)
{
DateTime[] simDates = uptake.Keys.ToArray();
Dictionary<DateTime, double> soilN = Functions.dictMaker(simDates, new double[simDates.Length]);
foreach (DateTime d in simDates)
{
if (d == simDates[0])
{
soilN[simDates[0]] = Constants.InitialN;
}
else
{
soilN[d] = soilN[d.AddDays(-1)];
}
soilN[d] += residue[d];
soilN[d] += som[d];
double actualUptake = uptake[d]; //Math.Min(uptake[d], minN[d]);
soilN[d] -= actualUptake;
}
return soilN;
}

/// <summary>
/// Calculates soil mineral nitrogen from an assumed initial value and modeled crop uptake and mineralisation from residues and soil organic matter
/// </summary>
Expand Down

0 comments on commit dc71bb9

Please sign in to comment.