1
Fork 0

Processing bathy: added hstru (poro)

This commit is contained in:
Edgar P. Burkhart 2022-03-02 11:24:09 +01:00
parent 86acc6ff5b
commit 2b6c561104
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
1 changed files with 6 additions and 5 deletions

View File

@ -26,14 +26,15 @@ hstru = np.loadtxt(root.joinpath(config.get("data", "hstru")))
x_hires = np.arange(-0.5 * bathy_hires.size, 0, 0.5)
x_lores = np.arange(-1 * bathy_lores.size, 0, 1)
#x_hstru = np.arange(-1 * hstru.size, 0, 1)
x_hstru = np.arange(-0.5 * hstru.size, 0, 0.5)
bathy_hires_pd = pd.Series(bathy_hires.copy(), index=x_hires)
bathy_lores_pd = pd.Series(bathy_lores.copy(), index=x_lores)
bathy = bathy_lores_pd
inter = bathy_lores_pd.index.intersection(bathy_hires_pd.index)
bathy[inter] = bathy_hires_pd[inter]
bathy = bathy_lores_pd.reindex(
bathy_lores_pd.index.union(bathy_hires_pd.index)
)
bathy[bathy_hires_pd.index] = bathy_hires_pd
if config.getboolean("proc", "plot", fallback=False):
if plt is None:
@ -43,7 +44,7 @@ if config.getboolean("proc", "plot", fallback=False):
fig, ax = plt.subplots()
ax.plot(x_hires, bathy_hires, label="High-res")
ax.plot(x_lores, bathy_lores, label="Low-res")
#ax.plot(x_hstru, hstru, label="H stru")
ax.plot(x_hstru, bathy[x_hstru]+hstru, label="H stru")
ax.plot(bathy.index, bathy, ls="-.", c="k", label="Combined")
ax.grid()