MODFLOW-USGS / mt3d-usgs

MT3D-USGS Repository
23 stars 12 forks source link

Wrong index for CMAS2 variable #18

Closed emorway-usgs closed 6 years ago

emorway-usgs commented 6 years ago

From Kurt Zeiler with Brown & Caldwell on 10/30/2017:

"Hey Eric & Vivek,

I hope all is well with both of you. We stumbled across a bug in MT3D-USGS for TVD with DRYCELL. There are 2 spots where DELR is being indexed by rows instead of columns (i.e., by I instead of J) in adv1.f – both left and right face calculations of CMAS2 along x-direction (lines 2721 and 2787). Here’s the corrected version of those lines:

CMAS2=-COLD(J,I,K)*QX(J-1,I,K)/DELR(J)           !kkz - was DELR(I) previously

We haven’t fully tested yet (just got new run started 15 min ago), but certainly seems more correct. Also, it doesn’t crash for our model that has more rows than columns. 😊

Please let me know if this doesn’t make sense or the fix above isn’t correct.

Kurt

Kurt Zeiler, P.G.* Principal Hydrogeologist Brown and Caldwell |1527 Cole Blvd., Suite 300 | Lakewood, CO"

emorway-usgs commented 6 years ago

Fixed with commit b4d1dd9

Thanks for passing along the bug and its fix, Kurt! Also, thanks for testing the fix with one of your models.