The attached scrum simulation throws an exception:
ERROR in file: C:\Work\Repos\APSIMInitiative\ApsimX\Prototypes\SCRUM\SCRUM.apsimx
Simulation name: SCRUMRotationComponent
Models.Core.SimulationException
---> System.Exception: newTemps(1) = 100.13956532272108 is outside range of -50 to 100
at Models.Soils.SoilTemp.SoilTemperature.boundCheck(Double VariableValue, Double Lower, Double Upper, String VariableName) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Soils\SoilTemp\SoilTemperature.cs:line 1532
at Models.Soils.SoilTemp.SoilTemperature.doThomas(Double[]& newTemps) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Soils\SoilTemp\SoilTemperature.cs:line 1199
at Models.Soils.SoilTemp.SoilTemperature.doProcess() in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Soils\SoilTemp\SoilTemperature.cs:line 1018
at Models.Soils.SoilTemp.SoilTemperature.OnProcess(Object sender, EventArgs e) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Soils\SoilTemp\SoilTemperature.cs:line 737
at Models.Clock.OnDoCommence(Object _, CommenceArgs e) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Clock.cs:line 373
at Models.Core.Simulation.Run(CancellationTokenSource cancelToken) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Core\Simulation.cs:line 298
--- End of inner exception stack trace ---
at Models.Core.Simulation.Run(CancellationTokenSource cancelToken) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Core\Simulation.cs:line 307
at Models.Core.Run.SimulationDescription.Run(CancellationTokenSource cancelToken) in C:\Work\Repos\APSIMInitiative\ApsimX\Models\Core\Run\SimulationDescription.cs:line 136
at APSIM.Shared.JobRunning.JobRunner.Run(IRunnable job) in C:\Work\Repos\APSIMInitiative\ApsimX\APSIM.Shared\JobRunning\JobRunner.cs:line 226
at APSIM.Shared.JobRunning.JobRunner.RunActualJob(IRunnable job, IJobManager jobManager) in C:\Work\Repos\APSIMInitiative\ApsimX\APSIM.Shared\JobRunning\JobRunner.cs:line 189
I think this is caused by a negative value of thermalConductivity[airNode] calculated on line 1015:
There are still problem with some simulations failing.
\ApsimX\Prototypes\WEIRDO\WEIRDO.apsimx - Sensibility\EvaporationInitialWaterDryerStill - newTemps(1) = -58.630164517039255 is outside range of -50 to 100
\ApsimX\Tests\Validation\Oats\Oats.apsimx - SLMACC_Southland_2021Rate300 - newTemps(6) = -50.36851149206518 is outside range of -50 to 100
\Tests\Validation\SWIM\SWIM.apsimx - System_14 - failed to find a solution
What happened?
The attached scrum simulation throws an exception:
I think this is caused by a negative value of thermalConductivity[airNode] calculated on line 1015:
To help with debugging, I inserted the following if statement to into line 1326:
This let me put a breakpoint inside the if statement and I could then debug line by line in getBoundaryLayerConductance.
At the bottom of getBoundaryLayerConductance, if I comment out the unstable conditions else statement, it runs without error:
SCRUM.zip
What Operating System are you on?
Windows