CH-Earth / summa

Structure for Unifying Multiple Modeling Alternatives:
http://www.ral.ucar.edu/projects/summa
GNU General Public License v3.0
80 stars 104 forks source link

Segfault in snowLiqFlx when doing scalar solution with JRDN layering #446

Closed arbennett closed 3 years ago

arbennett commented 3 years ago

Occasionally, when using JRDN snow layering I have run into segfaults on reference to mw_exp (only when doing scalar solutions) in snowLiqFlx.f90 on the line:

iLayerLiqFluxSnow(iLayer) = k_snow*relSaturn**mw_exp

after some debugging it turns out this loss of access to mw_exp occurs directly following the pack statement:

ixLayerDesired = pack(ixLayerState, ixSnowOnlyHyd/=integerMissing)

I have not been able to determine the exact reason for this error.

arbennett commented 3 years ago

Solved in #445