Skip to content

Commit 1ac756c

Browse files
committed
cleanup, release note
1 parent 2f8420b commit 1ac756c

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

autotest/test_gwt_fmi03.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""
22
Tests that multiple GWT models in the same simulation can reference
33
the same GWF head and budget files via the FMI package without error.
4-
Repro https://github.com/MODFLOW-ORG/modflow6/issues/2832.
54
6-
A transport simulation contains two GWT models, each for a different
7-
species, both of whose FMI packages point to the same GWF head/budget
8-
files. Previously this caused an error because the second FMI open
9-
attempt found the file already open on a unit held by the first FMI.
5+
Previously this caused an error because the second FMI open attempt
6+
found the output files already open on units held by the first FMI.
7+
8+
Reported in https://github.com/MODFLOW-ORG/modflow6/issues/2832.
109
"""
1110

1211
import flopy
@@ -17,16 +16,12 @@
1716
simname = "gwtfmi03"
1817
cases = [simname]
1918

20-
# grid
2119
nlay, nrow, ncol = 1, 1, 10
2220
delr = delc = 1.0
2321
top = 1.0
2422
botm = [0.0]
25-
# time discretisation
2623
nper = 2
2724
tdis_pd = [(5.0, 5, 1.0)] * nper
28-
29-
# transport
3025
porosity = 0.1
3126

3227

doc/ReleaseNotes/develop.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ description = "Stop with an informative error if a discretization package is mis
7373
section = "fixes"
7474
subsection = "model"
7575
description = "Fix the PRT PRP package's DRAPE option's behavior. A draped particle's release was previously reported in the original release position, followed by a DROPPED (ireason=6) event due to the particle reaching the water table at tracking time as a result of the default DRY\\_TRACKING\\_METHOD setting DROP. This is inconsistent with the intent of the DRAPE option: DRAPE is applied before release to control a particle's release position. Draped particles will now be released in the highest active cell, at the water table if the cell is convertible or at the geometric top if the cell is confined, and no DROPPED event will be reported."
76+
77+
[[items]]
78+
section = "fixes"
79+
subsection = "basic"
80+
description = "Previously, GWF model output files could only be referenced by a single coupled model's FMI package. Referencing the same GWF output files from multiple coupled models would cause a crash. Fix file-opening logic to allow multiple coupled models to refer to the same GWF model's output files."

src/Utilities/BinaryFileReader.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ subroutine peek_record(this)
107107
inquire (this%inunit, pos=this%headernext%pos)
108108
read (this%inunit, iostat=iostat) this%headernext%kstp, this%headernext%kper
109109
if (iostat == 0) then
110-
call fseek_stream(this%inunit, -2 * I4B, 1, iostat)
110+
read (this%inunit, pos=this%headernext%pos, iostat=iostat)
111111
else if (iostat < 0) then
112112
this%endoffile = .true.
113113
if (allocated(this%headernext)) deallocate (this%headernext)

src/Utilities/InputOutput.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ subroutine openfile(iu, iout, fname, ftype, fmtarg_opt, accarg_opt, &
101101
call freeunitnumber(iu)
102102
end if
103103
!
104-
! -- Check if file is already open (retained for error reporting only)
104+
! -- Check if file is already open
105105
inquire (file=fname(1:iflen), number=iuop)
106106
open (unit=iu, file=fname(1:iflen), form=fmtarg, access=accarg, &
107107
status=filstat, action=filact, iostat=ivar)

0 commit comments

Comments
 (0)