AquaticEcoDynamics / GLM

Code for the General Lake Model
http://aquatic.science.uwa.edu.au/research/models/GLM/
GNU General Public License v3.0
35 stars 29 forks source link

fixed issue with refernce the 0th index of the z array #17

Closed rqthomas closed 4 years ago

rqthomas commented 4 years ago

I was getting segmentation faults randomly with AED turned on. After looking into it, it appears that the code was trying to use the 0th index of the heights array. In some lucky runs zz(0) was set to zero but in unlucky runs zz(0) was not an integer - resulting in a sedimentation fault. Since the code is looking down the heights it seems that it wants stop the DO loop at 2 so that the last time through it looks down to the bottom height (i.e., the one with 1th index).

rqthomas commented 4 years ago

I found another location where the code was referencing an initialized zone temperature. I also revised the solution in the earlier pull request. I am closing this pull request and opening a new one