Skip to content

SWI2 issue with BCF #36

@jdhughes-dev

Description

@jdhughes-dev

Hello again, Dr. Hughes.

In attempting to apply the SWI2 module with our transient model of the Lower West Coast, we believe we have found an error in the SWI2 source code. We were wondering whether you had encountered the same during your efforts.

(I've attached a PDF version of this message, as it may be easier to read than a “plain text” version.)

In gwf2bcf7.f, there are some adjustments that eventually get applied to the dimensioning of the array SC2:

C5D-----LAYER TYPES 2 AND 3 NEED A TOP. ADD 1 TO KT.

      IF(L.EQ.2 .OR. L.EQ.3) NTOP=NTOP+1

  100 CONTINUE

However, in gwf2swi27.f, the logic is different:

C-------SET ICONV FOR EACH LAYER

      DO k = 1, NLAY

        ic = 1

        IF ( Ibcf.GT.0 ) THEN

          IF ( LCB(k).EQ.0 .OR. LCB(k).EQ.2 ) ic = 0

Our run was crashing, we believe, because of the mismatch—the program was attempting to reference a portion of the SC2 array that was not there because it had been dimensioned according to gwf2bcf7.f, but called upon as if there were an additional “page” (dimension 3) in the array.

Our LAYCON array for these runs is 1 3 3 3 3 3 3 3 3.

We seem to have corrected the issue by revising gwf2bcf7.f:

          IF ( LCB(k).EQ.0 .OR. LCB(k).EQ.1 ) ic = 0

Thanks,

Michael

D. Michael Parrish, PhD, PE | Engineering Specialist 4 | Water Supply Bureau, Resource Evaluation Section, Groundwater Modeling Unit | 561-682-2815
Florida enjoys a broad public records law—any emails sent to or from this address are subject to review by the public at any time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions