|
8 | 8 | from flopy4.mf6.simulation import Simulation |
9 | 9 | from flopy4.mf6.tdis import Tdis |
10 | 10 |
|
11 | | -ws = Path("./quickstart_data") |
| 11 | +ws = Path(__file__).parent / "quickstart_data" |
12 | 12 | name = "mymodel" |
13 | 13 | tdis = Tdis() |
14 | 14 | ims = Ims() |
|
41 | 41 | assert oc.data["save_head"][0] == "all" |
42 | 42 | assert oc.data.save_head.sel(per=0) == "all" |
43 | 43 |
|
44 | | -# PLOT |
45 | | - |
46 | | -# set specific discharge |
47 | | -spdis = gwf.output.budget |
48 | | -heads = gwf.output.head |
49 | | -sq = heads.squeeze() |
| 44 | +# get head and budget results |
| 45 | +budget = gwf.output.budget.squeeze() |
| 46 | +head = gwf.output.head.squeeze() |
50 | 47 |
|
| 48 | +# make plot |
51 | 49 | fig, ax = plt.subplots() |
52 | 50 | ax.tick_params() |
53 | 51 | ax.set_xticks(np.arange(0, 11, 2), minor=False) |
54 | 52 | ax.set_xticks(np.arange(1, 10, 2), minor=True) |
55 | 53 | ax.set_yticks(np.arange(0, 11, 2), minor=False) |
56 | 54 | ax.set_yticks(np.arange(1, 10, 2), minor=True) |
57 | 55 | ax.grid(which="both", color="white") |
58 | | -sq.plot.imshow(ax=ax) |
59 | | -sq.plot.contour(ax=ax, levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0) |
60 | | -spdis.squeeze().plot.quiver( |
| 56 | +head.plot.imshow(ax=ax) |
| 57 | +head.plot.contour(ax=ax, levels=[0.2, 0.4, 0.6, 0.8], linewidths=3.0) |
| 58 | +budget.plot.quiver( |
61 | 59 | x="x", y="y", u="npf-qx", v="npf-qy", ax=ax, color="white" |
62 | 60 | ) |
63 | | -qs_pth = Path("./image/quickstart.png") |
64 | | -fig.savefig(qs_pth) |
| 61 | +fig.savefig(ws / "quickstart.png") |
0 commit comments