MODFLOW-USGS / mt3d-usgs

MT3D-USGS Repository
23 stars 12 forks source link

Crash in LKT #69

Closed RichardWinston closed 4 years ago

RichardWinston commented 4 years ago

LKT_Bug.zip This model crashes in the LKT package on line 269 of lkt1.f. I suspect the problem is an uninitialized pointer (NSFR2LAK). The model does not include the SFR package.

emorway-usgs commented 4 years ago

@RichardWinston Thank you for the small reproducible example, those make all the difference! As you suspected, the uninitialized variables were the issue. As you know (but will repeat for others that may be 'following' correspondence on the MT3D-USGS repo), MT3D-USGS doesn't yes support pacakge-to-package flows in MODFLOW 6 (for example, SFR -> LAK), but even so, we should have been initializing these variables as they are needed in some of the FM routines. We simply need to set their values to zero when using MF6.

I was able to get your simulation to run with the amended code (and it is still testing on Travis). Let me know if you like me to recompile MT3D-USGS and send you a version, or if you prefer to pull the latest code and compile locally?