1
Fork 0

Data processing for article

This commit is contained in:
Edgar P. Burkhart 2022-07-06 07:55:18 +02:00
parent c443947e3c
commit 34fcb4e879
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 9 additions and 2 deletions

View file

@ -60,6 +60,12 @@ x = np.arange(
)
theta = np.angle(D.dot((1, 1j)))
log.info(f"N points: {bathy.size:e}")
S = bathy[:, 0].ptp() * bathy[:, 1].ptp()
log.info(f"Surface: {S*1e-6:.2f}km^2")
res = np.sqrt(S / bathy.size)
log.info(f"Resolution: {res:.2f}m")
coords = artha + (x * np.stack((np.cos(theta), np.sin(theta)))).T
log.info("Interpolating bathymetry in 1D")

View file

@ -78,6 +78,7 @@ dj = 0.5
J = 1 / dj * np.log2(N * dt / s0)
j = np.arange(0, J)
sj = s0 * 2 ** (j * dj)
Tj = 2 * sj * np.pi / 5
# sj = s0 * np.arange(1, 2 ** (J * dj))
Mw = sj / dt
Mlims = sj[[0, -1]]
@ -99,7 +100,7 @@ ax.set(zorder=1, frame_on=False)
ax.semilogy()
a = [t0[0], t0[-1], *Mlims]
# c = ax.imshow(M, extent=a, aspect="auto", cmap="plasma", vmin=0)
c = ax.contourf(t, sj, M, cmap="Greys", vmin=0, vmax=v)
c = ax.contourf(t, Tj, M, cmap="Greys", vmin=0, vmax=v)
fig.colorbar(c)
H13 = np.quantile(wave, 2 / 3)
@ -131,7 +132,7 @@ for w, ax2, ax in zip(bigw, ax_[::2].flatten(), ax_[1::2].flatten()):
log.info(f"Wave [{w}] size: {ws:.2f}m")
c = ax2.contourf(
t[i0:i1],
sj,
Tj,
M[:, i0:i1],
cmap="Greys",
vmin=0,