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

New Soil temperature tidy up #9283

Merged
merged 26 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a456b4e
Added some component-based sand-silt-clay and rocks sensitivity tests
sno036 May 21, 2024
50f7b23
Added sensitivity tests for the estimated texture and rocks contents.…
sno036 May 21, 2024
41c0673
Merge branch 'master' of https://github.com/APSIMInitiative/ApsimX in…
rcichota Sep 4, 2024
12657a7
Tidying up the code - phase 1a, just 'summary' tags.
rcichota Sep 5, 2024
6b31398
More code tidy up (add summary tags to variables)
rcichota Sep 5, 2024
50927d5
More tiying up, sorting variables from constants (not finished)
rcichota Sep 5, 2024
4669032
Bring in changes done by Dean in another branch
rcichota Sep 5, 2024
0d4ed31
Fix changed stats on jenkins
hol353 Sep 5, 2024
6e3b1d8
Replacing dictionary with properties of sol constitutents with functi…
rcichota Sep 6, 2024
bc091c6
Merge branch 'master' of https://github.com/APSIMInitiative/ApsimX in…
rcichota Sep 6, 2024
c7ef722
Fix last commit to replicate original code (actaully is wrong... to b…
rcichota Sep 6, 2024
9484c4b
Deleting or a number of functions taht were not used, plus replacing …
rcichota Sep 6, 2024
1212ca8
Merge branch 'master' of https://github.com/APSIMInitiative/ApsimX in…
rcichota Sep 6, 2024
8fd8453
Add in changes done by Dean
rcichota Sep 6, 2024
554d28c
update parameter for deth to constant temperature
rcichota Sep 6, 2024
26bb213
Further clean up in code, reduce redundant variables and excess of co…
rcichota Sep 6, 2024
c33b851
Another batch of updates, tidying up some variable names, more summar…
rcichota Sep 8, 2024
98b23de
Fix a bunch of inits / doco
rcichota Sep 9, 2024
c038af2
remove all tabs and trailing spaces
rcichota Sep 9, 2024
c2fbeaa
replace internal wind variable with weather.wind
rcichota Sep 9, 2024
f7bebf9
replace interal airpressure variable with weather.AorPressure
rcichota Sep 9, 2024
fe0760f
move weather files in test sim folder to 'proper' weather folder
rcichota Sep 9, 2024
a77f8f2
add a seed to WeatherSampler so example simulation runs
rcichota Sep 9, 2024
24336d1
Update ISoilTemperature and dependencies to include variables for soi…
rcichota Sep 9, 2024
e609ef4
Fixing a few references to SoilTemperature variables
rcichota Sep 9, 2024
918b7af
Merge branch 'master' of https://github.com/APSIMInitiative/ApsimX in…
rcichota Sep 9, 2024
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
315 changes: 101 additions & 214 deletions Examples/Tutorials/InitialisingSoilCarbonPools.apsimx

Large diffs are not rendered by default.

21 changes: 20 additions & 1 deletion Models/Interfaces/ISoilTemperature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,26 @@
/// </summary>
public interface ISoilTemperature
{
/// <summary>Returns soil temperature for each layer (oc)</summary>
/// <summary>Returns soil temperature for each layer (oC)</summary>
double[] Value { get; }

/// <summary>Returns the daily average soil temperature for each layer (oC)</summary>
double[] AverageSoilTemperature { get; }

/// <summary>Returns the daily average temperature of soil surface (oC)</summary>
double AverageSoilSurfaceTemperature { get; }

/// <summary>Returns the daily minimum soil temperature for each layer (oC)</summary>
double[] MinimumSoilTemperature { get; }

/// <summary>Returns the daily minimum temperature of soil surface (oC)</summary>
double MinimumSoilSurfaceTemperature { get; }

/// <summary>Returns the daily maximum soil temperature for each layer (oC)</summary>
double[] MaximumSoilTemperature { get; }

/// <summary>Returns the daily maximum temperature of soil surface (oC)</summary>
double MaximumSoilSurfaceTemperature { get; }

}
}
20 changes: 19 additions & 1 deletion Models/Soils/SoilTemp/CERESSoilTemperature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,27 @@ private void Clear()
surf_temp[day] = ave_temp;
}

/// <summary>Returns soil temperature for each layer (oc)</summary>
/// <summary>Soil temperature for each layer (oC)</summary>
public double[] Value { get { return st; } }

/// <summary>Average soil temperature for each layer (oC)</summary>
public double[] AverageSoilTemperature { get { return st; } }

/// <summary>Average soil temperature for soil surface (oC)</summary>
public double AverageSoilSurfaceTemperature { get { return double.NaN; } }

/// <summary>Average soil temperature for each layer (oC)</summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Daily minimum soil temperature

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We thought about using the term "Daily" in the name, but it would make it long, and Dean remarks that all variables in APSIM are on a daily basis... I will correct the info in the summary tag in the next commit...

public double[] MinimumSoilTemperature { get { return st; } }

/// <summary>Average soil temperature for soil surface (oC)</summary>
public double MinimumSoilSurfaceTemperature { get { return double.NaN; } }

/// <summary>Average soil temperature for each layer (oC)</summary>
public double[] MaximumSoilTemperature { get { return st; } }

/// <summary>Average soil temperature for soil surface (oC)</summary>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Daily maximum soil temperature

public double MaximumSoilSurfaceTemperature { get { return double.NaN; } }

/// <summary>Called to perform soil temperature calculations</summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
Expand Down
2,200 changes: 838 additions & 1,362 deletions Models/Soils/SoilTemp/SoilTemperature.cs

Large diffs are not rendered by default.

1,548 changes: 614 additions & 934 deletions Tests/UnderReview/SoilTemperature/SoilTemperature.apsimx

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Tests/UnitTests/Soils/MockSoilTemperature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ namespace UnitTests.Soils
internal class MockSoilTemperature : Model, ISoilTemperature
{
public double[] Value { get; set; }
public double[] AverageSoilTemperature { get; }
public double AverageSoilSurfaceTemperature { get; }
public double[] MinimumSoilTemperature { get; }
public double MinimumSoilSurfaceTemperature { get; }
public double[] MaximumSoilTemperature { get; }
public double MaximumSoilSurfaceTemperature { get; }
}
}