Skip to content

Commit e27c957

Browse files
mjrenomjreno
authored andcommitted
save npf flows to fix quickstart plot
1 parent ed928bb commit e27c957

File tree

5 files changed

+5
-413
lines changed

5 files changed

+5
-413
lines changed

docs/examples/image/quickstart.png

33.1 KB
Loading

docs/examples/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
gwf_name = "mymodel"
2727
ims = Ims(parent=sim, models=[gwf_name]) # temporary hack
2828
gwf = Gwf(parent=sim, name=gwf_name, save_flows=True, dis=grid)
29-
npf = Npf(parent=gwf, save_specific_discharge=True)
29+
npf = Npf(parent=gwf, print_flows=True, save_flows=True, save_specific_discharge=True)
3030
chd = Chd(
3131
parent=gwf,
3232
head={0: {(0, 0, 0): 1.0, (0, 9, 9): 0.0}},
@@ -66,5 +66,5 @@
6666
ax.grid(which="both", color="white")
6767
head.plot.imshow(ax=ax)
6868
head.plot.contour(ax=ax, levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0)
69-
# budget.plot.quiver(x="x", y="y", u="npf-qx", v="npf-qy", ax=ax, color="white")
69+
budget.plot.quiver(x="x", y="y", u="npf-qx", v="npf-qy", ax=ax, color="white")
7070
fig.savefig(workspace / ".." / "image" / "quickstart.png")

flopy4/mf6/converter/unstructure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ def unstructure_component(value: Component) -> dict[str, Any]:
247247
key = f"period {kper + 1}"
248248
for arr_name, val in block.items():
249249
if np.any(val != FILL_DNODATA):
250+
# don't create the block (so it isn't written)
251+
# unless there is data to write
250252
if key not in blocks:
251253
blocks[key] = {}
252254
match block[arr_name]:

0 commit comments

Comments
 (0)