Skip to content

Commit

Permalink
update(MFSimulationBase): allow simulations to have no attached models (
Browse files Browse the repository at this point in the history
#2140)

* update(MFSimulationBase): allow simulations to have no attached models

* updates for mfmodel
  • Loading branch information
jlarsen-usgs committed Apr 6, 2024
1 parent 0f14f1f commit 9e87acd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flopy/mf6/mfmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,9 @@ def load_base(
package_recarray = instance.simulation_data.mfdata[
(modelname, "nam", "packages", "packages")
]
if package_recarray.array is None:
return instance

for item in package_recarray.get_data():
if item[0] in priority_packages:
packages_ordered.insert(0, (item[0], item[1], item[2]))
Expand Down
3 changes: 3 additions & 0 deletions flopy/mf6/mfsimbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,9 @@ def load(
package="nam",
message=message,
)
if models is None:
return instance

for item in models:
# resolve model working folder and name file
path, name_file = os.path.split(item[1])
Expand Down

0 comments on commit 9e87acd

Please sign in to comment.