Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(keyword data): optional keywords (#1909) #1920

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions autotest/test_mf6.py
Original file line number Diff line number Diff line change
Expand Up @@ -2186,6 +2186,20 @@ def test_multi_model(function_tmpdir):
assert rec_array[0][3] == model_names[1]
assert rec_array[1][1] == "transport.ims"
assert rec_array[1][2] == model_names[2]
# test ssm fileinput
gwt2 = sim2.get_model("gwt_model_1")
ssm2 = gwt2.get_package("ssm")
fileinput = [
("RCH-1", f"gwt_model_1.rch1.spc"),
("RCH-2", f"gwt_model_1.rch2.spc"),
("RCH-3", f"gwt_model_1.rch3.spc", "MIXED"),
("RCH-4", f"gwt_model_1.rch4.spc"),
]
ssm2.fileinput = fileinput
fi_out = ssm2.fileinput.get_data()
assert fi_out[2][1] == "gwt_model_1.rch3.spc"
assert fi_out[1][2] is None
assert fi_out[2][2] == "MIXED"

# create a new gwt model
sourcerecarray = [("WEL-1", "AUX", "CONCENTRATION")]
Expand Down
1 change: 1 addition & 0 deletions flopy/mf6/data/mfdatastorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2857,6 +2857,7 @@ def build_type_list(
if (
data_item.type != DatumType.keyword
or data_set.block_variable
or data_item.optional
):
initial_keyword = False
shape_rule = None
Expand Down