From e49eda3d049e18f69fd0e33fe58ee335b474cbef Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 12 Apr 2022 10:30:34 +0200 Subject: [PATCH] Plot input wave --- olaflow/processing/sws_wavedict_paddle.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/olaflow/processing/sws_wavedict_paddle.py b/olaflow/processing/sws_wavedict_paddle.py index 02ba15e..d1b2150 100644 --- a/olaflow/processing/sws_wavedict_paddle.py +++ b/olaflow/processing/sws_wavedict_paddle.py @@ -56,3 +56,12 @@ org = org.replace("{t}", "\n".join(t.astype(np.str_))) org = org.replace("{v}", "\n".join(v.astype(np.str_))) org = org.replace("{eta}", "\n".join(wl.astype(np.str_))) olaflow_root.joinpath("constant", "waveDict").write_text(org) + +fig, ax = plt.subplots() +ax.plot(t, wl) +ax.autoscale(True, "x", tight=True) +ax.set(xlabel="t (s)", ylabel="z (m)") +ax2 = ax.twinx() +ax2.plot(t, v) +ax2.set(ylabel="U (m/s)") +fig.savefig(olaflow_root.joinpath("constant", "wave.pdf"))