Skip to content

Commit 89fc16b

Browse files
fix(modflow/pakbase) issue 1661 (#1663)
fix bug in pakbase: defining number of parameters per stress period close #1661
1 parent 94cd19d commit 89fc16b

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

flopy/pakbase.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,21 +1059,18 @@ def load(f, model, pak_type, ext_unit_dict=None, **kwargs):
10591059
t = line.strip().split()
10601060
itmp = int(t[0])
10611061
itmpp = 0
1062-
try:
1062+
if nppak > 0:
10631063
itmpp = int(t[1])
1064-
except:
1065-
if len(t) > 1:
1066-
t = t[
1067-
:2
1068-
] # trap cases with text followed by digits (eg SP 5)
1069-
if model.verbose:
1070-
print(f" implicit itmpp in {filename}")
1064+
1065+
if len(t) > 1:
1066+
t = t[:2] # trap cases with text followed by digits (eg SP 5)
10711067
itmp_cln = 0
1072-
try:
1073-
itmp_cln = int(t[2])
1074-
except:
1075-
if model.verbose:
1076-
print(f" implicit itmp_cln in {filename}")
1068+
if "mfusgwel" in pak_type_str:
1069+
try:
1070+
itmp_cln = int(t[2])
1071+
except:
1072+
if model.verbose:
1073+
print(f" implicit itmp_cln of 0 in {filename}")
10771074

10781075
if itmp == 0:
10791076
bnd_output = None

0 commit comments

Comments
 (0)