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 1 commit
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
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
18 changes: 9 additions & 9 deletions Models/Soils/SoilTemp/SoilTemperature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ public string[] Depth

/// <summary>Temperatures over the soil profile at end of a day, i.e. at midnight</summary>
[Units("oC")]
public double[] FinalSoilTemp
public double[] FinalSoilTemperature
{
get
{
Expand All @@ -562,17 +562,17 @@ public double[] FinalSoilTemp

/// <summary>Temperature of soil surface at end of a day, i.e. at midnight</summary>
[Units("oC")]
public double FinalSoilSurfaceTemp { get { return soilTemp[surfaceNode]; } }
public double FinalSoilSurfaceTemperature { get { return soilTemp[surfaceNode]; } }

/// <summary>Temperature of soil layers averaged over a day</summary>
/// <remarks>Mandatory for ISoilTemperature interface. For now, just return average daily values - CHECK</remarks>
[Units("oC")]
public double[] Value { get { return AverageSoilTemp; } }
public double[] Value { get { return AverageSoilTemperature; } }

/// <summary>Temperatures over soil profile averaged over a day</summary>
/// <remarks>If called during init1, this will return an array of length 100 with all elements as 0.0</remarks>
[Units("oC")]
public double[] AverageSoilTemp
public double[] AverageSoilTemperature
{
get
{
Expand All @@ -584,11 +584,11 @@ public double[] AverageSoilTemp

/// <summary>Temperature of soil surface averaged over a day</summary>
[Units("oC")]
public double AverageSoilSurfaceTemp { get { return aveSoilTemp[surfaceNode]; } }
public double AverageSoilSurfaceTemperature { get { return aveSoilTemp[surfaceNode]; } }

/// <summary>Minimum temperatures over the soil profile within a day</summary>
[Units("oC")]
public double[] MinSoilTemp
public double[] MinimumSoilTemperature
{
get
{
Expand All @@ -600,11 +600,11 @@ public double[] MinSoilTemp

/// <summary>Minimum temperatures of soil surface within a day</summary>
[Units("oC")]
public double minSoilSurfaceTemp { get { return minSoilTemp[surfaceNode]; } }
public double MinimumSoilSurfaceTemperature { get { return minSoilTemp[surfaceNode]; } }

/// <summary>Maximum temperatures over the soil profile within a day</summary>
[Units("oC")]
public double[] MaxSoilTemp
public double[] MaximumSoilTemperature
{
get
{
Expand All @@ -616,7 +616,7 @@ public double[] MaxSoilTemp

/// <summary>Maximum temperatures of soil surface within a day</summary>
[Units("oC")]
public double MaxSoilSurfaceTemp { get { return maxSoilTemp[surfaceNode]; } }
public double MaximumSoilSurfaceTemperature { get { return maxSoilTemp[surfaceNode]; } }

/// <summary>Atmosphere boundary layer conductance averaged over a day</summary>
[Units("W/K")]
Expand Down
Loading