From ceb4af811e14e6ae275d0b8f5693704090f848c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Mu=CC=88ller?= Date: Mon, 24 Jul 2023 09:20:39 +0200 Subject: [PATCH] Add option to show flow show_arrows in conc plot --- src/pymf6/modeling_tools/plotting.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pymf6/modeling_tools/plotting.py b/src/pymf6/modeling_tools/plotting.py index 8741434..ec22f58 100644 --- a/src/pymf6/modeling_tools/plotting.py +++ b/src/pymf6/modeling_tools/plotting.py @@ -85,7 +85,8 @@ def show_concentration( show_wells=True, vmin=None, vmax=None, - show_contours=True,): + show_contours=True, + show_arrows=False,): """Plot calculated heads along with flow vector.""" gwtname = 'gwt_' + name sim = get_simulation(model_path, name) @@ -110,6 +111,16 @@ def show_concentration( plot.axes.set_title(title) cbar = arr.get_figure().colorbar(arr, ticks=levels) cbar.set_label('Concentration') + if show_arrows: + gwf = sim.get_model(name) + bud = gwf.output.budget() + spdis = bud.get_data(text='DATA-SPDIS')[240] + qx, qy, _ = get_specific_discharge(spdis, gwf) + plot = pmv.plot_vector( + qx, + qy, + normalize=True, + color="white") return plot