1
Fork 0

Compare commits

..

No commits in common. "166331cd31b69f62a4654dfe00d62dda172368f1" and "479230840be322a140a2ab407f49e2131cb32011" have entirely different histories.

2 changed files with 5 additions and 9 deletions

View file

@ -1,4 +0,0 @@
function openfoam_env
bash --rcfile /opt/openfoam9/etc/bashrc -ic "fish -C 'function fish_prompt; echo -s (set_color 66cc00) \"openfoam\" (set_color normal) \" \\\$ \"; end'"
end

View file

@ -36,11 +36,11 @@ log.info("Plotting results")
vlim = np.nanmin(np.maximum(watl, -botl)), np.nanmax(np.maximum(watl, -botl)) vlim = np.nanmin(np.maximum(watl, -botl)), np.nanmax(np.maximum(watl, -botl))
x0 = np.linspace(-700, -200, 6) x0 = np.linspace(-600, -200, 5)
i0 = np.argmin(np.abs(x[:, None] - x0), axis=0) i0 = np.argmin(np.abs(x[:, None] - x0), axis=0)
fig_x, ax = plt.subplots( fig_x, ax = plt.subplots(
3, 2, figsize=(15 / 2.54, 7.5 / 2.54), constrained_layout=True 5, 1, figsize=(15 / 2.54, 15/ 2.54), constrained_layout=True
) )
dt = np.mean(np.diff(t)) dt = np.mean(np.diff(t))
N = t.size N = t.size
@ -55,8 +55,8 @@ M = np.stack([(np.abs(sgl.cwt(watl[:, i], sgl.morlet2, Mw))/sig)**2 for i in i0]
v = np.max(M) v = np.max(M)
T = 2 * sj * np.pi / 5 T = 2 * sj * np.pi / 5
for ax_x, M_, x_ in zip(ax.flatten(), M, x[i0]): for ax_x, M_, x_ in zip(ax.reshape(-1), M, x[i0]):
c = ax_x.contourf(t, T, M_, cmap="Greys", vmin=0, levels=[1, 4, 16, 64], extend="both") c = ax_x.contourf(t, T, M_, cmap="Greys", vmin=0, levels=[1, 2.5, 5, 10, 20, 40], extend="both")
fig_x.colorbar(c, ax=ax_x, label="NWPS") fig_x.colorbar(c, ax=ax_x, label="NWPS")
ax_x.grid(color="k", alpha=0.2) ax_x.grid(color="k", alpha=0.2)
ax_x.text( ax_x.text(
@ -77,7 +77,7 @@ for ax_x, M_, x_ in zip(ax.flatten(), M, x[i0]):
ax_x.yaxis.set_major_locator(LogLocator(10, numticks=2**10)) ax_x.yaxis.set_major_locator(LogLocator(10, numticks=2**10))
ax_x.yaxis.set_minor_locator(LogLocator(10, subs=np.arange(10), numticks=2**10)) ax_x.yaxis.set_minor_locator(LogLocator(10, subs=np.arange(10), numticks=2**10))
ax_x.yaxis.set_minor_formatter(NullFormatter()) ax_x.yaxis.set_minor_formatter(NullFormatter())
if ax_x not in ax[-1]: if ax_x != ax.reshape(-1)[-1]:
ax_x.axes.set_xticklabels([]) ax_x.axes.set_xticklabels([])
else: else:
ax_x.set(xlabel="t (s)") ax_x.set(xlabel="t (s)")