Skip to content
Open
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
4 changes: 2 additions & 2 deletions .docs/Notebooks/dis_triangle_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@
sim,
print_option="SUMMARY",
complexity="complex",
outer_hclose=1.0e-8,
inner_hclose=1.0e-8,
outer_dvclose=1.0e-8,
inner_dvclose=1.0e-8,
)
cell2d = tri.get_cell2d()
vertices = tri.get_vertices()
Expand Down
4 changes: 2 additions & 2 deletions .docs/Notebooks/export_vtk_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,11 @@ def run_vertex_grid_example(ws):
pname="ims",
print_option="SUMMARY",
complexity="SIMPLE",
outer_hclose=1.0e-5,
outer_dvclose=1.0e-5,
outer_maximum=100,
under_relaxation="NONE",
inner_maximum=100,
inner_hclose=1.0e-6,
inner_dvclose=1.0e-6,
rcloserecord=0.1,
linear_acceleration="BICGSTAB",
scaling_method="NONE",
Expand Down
4 changes: 2 additions & 2 deletions .docs/Notebooks/mf6_data_tutorial10.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
sim,
print_option="SUMMARY",
complexity="SIMPLE",
outer_hclose=0.0001,
outer_dvclose=0.0001,
outer_maximum=500,
under_relaxation="NONE",
inner_maximum=100,
inner_hclose=0.0001,
inner_dvclose=0.0001,
rcloserecord=0.001,
linear_acceleration="CG",
scaling_method="NONE",
Expand Down
4 changes: 2 additions & 2 deletions .docs/Notebooks/modpath7_create_simulation_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def get_nodes(locs):
sim,
pname="ims",
complexity="SIMPLE",
outer_hclose=1e-6,
inner_hclose=1e-6,
outer_dvclose=1e-6,
inner_dvclose=1e-6,
rcloserecord=1e-6,
)

Expand Down
4 changes: 2 additions & 2 deletions .docs/Notebooks/plot_cross_section_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,11 +685,11 @@ def run_vertex_grid_example(ws):
pname="ims",
print_option="SUMMARY",
complexity="SIMPLE",
outer_hclose=1.0e-5,
outer_dvclose=1.0e-5,
outer_maximum=100,
under_relaxation="NONE",
inner_maximum=100,
inner_hclose=1.0e-6,
inner_dvclose=1.0e-6,
rcloserecord=0.1,
linear_acceleration="BICGSTAB",
scaling_method="NONE",
Expand Down
4 changes: 2 additions & 2 deletions .docs/Notebooks/plot_map_view_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,11 +863,11 @@ def run_vertex_grid_example(ws):
pname="ims",
print_option="SUMMARY",
complexity="SIMPLE",
outer_hclose=1.0e-5,
outer_dvclose=1.0e-5,
outer_maximum=100,
under_relaxation="NONE",
inner_maximum=100,
inner_hclose=1.0e-6,
inner_dvclose=1.0e-6,
rcloserecord=0.1,
linear_acceleration="BICGSTAB",
scaling_method="NONE",
Expand Down
4 changes: 2 additions & 2 deletions autotest/test_modpathfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def get_nodes(locs):
sim,
pname="ims",
complexity="SIMPLE",
outer_hclose=1e-6,
inner_hclose=1e-6,
outer_dvclose=1e-6,
inner_dvclose=1e-6,
rcloserecord=1e-6,
)

Expand Down
4 changes: 2 additions & 2 deletions autotest/test_specific_discharge.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ def mf6_model(function_tmpdir):
pname="ims",
print_option="SUMMARY",
complexity="SIMPLE",
outer_hclose=1.0e-5,
outer_dvclose=1.0e-5,
outer_maximum=50,
under_relaxation="NONE",
inner_maximum=30,
inner_hclose=1.0e-5,
inner_dvclose=1.0e-5,
rcloserecord=rcloserecord,
linear_acceleration="CG",
scaling_method="NONE",
Expand Down
4 changes: 2 additions & 2 deletions flopy/mf6/mfmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,15 +744,15 @@ def solver_tols(self):

Returns
-------
inner_hclose, rclose : float, float
inner_dvclose, rclose : float, float

"""
ims = self.get_ims_package()
if ims is not None:
rclose = ims.rcloserecord.get_data()
if rclose is not None:
rclose = rclose[0][0]
return ims.inner_hclose.get_data(), rclose
return ims.inner_dvclose.get_data(), rclose
return None

@property
Expand Down
10 changes: 10 additions & 0 deletions flopy/mf6/utils/codegen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ def _add_nam_suffix(dfn):
# parsed haphazardly throughout the mf6 module. TODO: when
# the legacy DFN is no longer needed at runtime, remove.
if version == 2:
# import here instead of module so we don't
# expect optional deps at module init time
from boltons.dictutils import OMD

assert legacydir is not None, (
"legacydir must be provided for version 2 DFNs"
)
Expand All @@ -144,6 +148,12 @@ def _add_nam_suffix(dfn):
for dfn_name, dfn in dfns.items():
with open(legacydir / f"{dfn_name}.dfn") as df:
legacy_dfn, legacy_meta = Dfn._load_v1_flat(df, common=common)
# drop fields removed as of this DFN's MF6 version
legacy_dfn = OMD(
(k, v)
for k, v in legacy_dfn.items(multi=True)
if not v.get("removed", False)
)
dfn["legacy_dfn"] = legacy_dfn
dfn["legacy_meta"] = legacy_meta

Expand Down
2 changes: 2 additions & 0 deletions flopy/mf6/utils/codegen/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def visit(p, k, v):
if (
isinstance(v, dict)
and "type" in v
# skip vars removed as of the DFN's MF6 version
and not v.get("removed", False)
# support 'prerelease' for now but it's been deprecated for 'developmode'
and (developmode or not v.get("developmode", v.get("prerelease", False)))
):
Expand Down
Loading