Compare commits
3 commits
479230840b
...
166331cd31
Author | SHA1 | Date | |
---|---|---|---|
166331cd31 | |||
35cbecd0c8 | |||
4ae8a0def6 |
2 changed files with 9 additions and 5 deletions
4
openfoam_env.fish
Normal file
4
openfoam_env.fish
Normal file
|
@ -0,0 +1,4 @@
|
|||
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
|
||||
|
|
@ -36,11 +36,11 @@ log.info("Plotting results")
|
|||
|
||||
vlim = np.nanmin(np.maximum(watl, -botl)), np.nanmax(np.maximum(watl, -botl))
|
||||
|
||||
x0 = np.linspace(-600, -200, 5)
|
||||
x0 = np.linspace(-700, -200, 6)
|
||||
i0 = np.argmin(np.abs(x[:, None] - x0), axis=0)
|
||||
|
||||
fig_x, ax = plt.subplots(
|
||||
5, 1, figsize=(15 / 2.54, 15/ 2.54), constrained_layout=True
|
||||
3, 2, figsize=(15 / 2.54, 7.5 / 2.54), constrained_layout=True
|
||||
)
|
||||
dt = np.mean(np.diff(t))
|
||||
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)
|
||||
T = 2 * sj * np.pi / 5
|
||||
|
||||
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, 2.5, 5, 10, 20, 40], extend="both")
|
||||
for ax_x, M_, x_ in zip(ax.flatten(), M, x[i0]):
|
||||
c = ax_x.contourf(t, T, M_, cmap="Greys", vmin=0, levels=[1, 4, 16, 64], extend="both")
|
||||
fig_x.colorbar(c, ax=ax_x, label="NWPS")
|
||||
ax_x.grid(color="k", alpha=0.2)
|
||||
ax_x.text(
|
||||
|
@ -77,7 +77,7 @@ for ax_x, M_, x_ in zip(ax.reshape(-1), M, x[i0]):
|
|||
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_formatter(NullFormatter())
|
||||
if ax_x != ax.reshape(-1)[-1]:
|
||||
if ax_x not in ax[-1]:
|
||||
ax_x.axes.set_xticklabels([])
|
||||
else:
|
||||
ax_x.set(xlabel="t (s)")
|
||||
|
|
Loading…
Reference in a new issue