Eawag-AppliedSystemAnalysis / Simstrat

Simstrat - 1D lake model
http://www.eawag.ch/en/department/surf/projects/simstrat/
GNU General Public License v3.0
18 stars 8 forks source link

Unstable near-bottom temperatures and invalid memory reference error #41

Closed jorritmesman closed 3 years ago

jorritmesman commented 4 years ago

When running Simstrat, sometimes large spikes in near-bottom temperatures appear (see attached figures). These do not always show up; if I run with low a_seiche values, for example, all seems normal. Any idea what may be causing this? I've attached the Tout.dat file (have a look at day 258). I've also attached a reproducible example, including the executable I'm using (you may need to add an empty "output" folder). Also as a note, the spikes are very short and the temperatures at the surface and the mid water column do not seem to be affected.

While I was figuring out what was the cause of this issue, another problem appeared. In the reproducible example, if you change "Start Year" to 2007, "End d" to 1460, and "a_seiche" to 0.00362, I get the error:

...
 [OK] Input file successfully read: input temperature
 [OK] Input file successfully read: input salinity
 Simulation progress |#######-------------------------|  21%
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x49cc73
#1  0x49553b
#2  0x46f2de
#3  0x7657a27c

I don't know if this is related to the issue with the near-bottom temperatures.

I am running Simstrat v 2.4.1 on Windows 10

Let me know if I need to send more information, or if I can help in any other way.

Repr_example_Simstrat.zip

T_out.txt

Plot_aseiche_003

Plot_aseiche_006

f-baerenbold commented 4 years ago

Ok, this looks like a problem. I'll have a look at it today. Thanks for the complete description.

f-baerenbold commented 4 years ago

So it seems that the problem is your time resolution of 1 hour. The more I increase the resolution, the less spikes there are. With a resolution of 5 minutes, the results look perfect. With 10 minutes, I have like 1 spike in 3 years, but which does not influence the results otherwise. Personally, I always use 5 minutes as time resolution, but I have seen other simulations work perfectly well with a resolution of 1 hour. We should probably write in the manual that such instabilities can be due to too low time resolution.

jorritmesman commented 4 years ago

Interesting... Did this also fix the SIGSEGV: Segmentation fault - invalid memory reference error?

f-baerenbold commented 4 years ago

Yes