Add no breakwater case
This commit is contained in:
parent
095964f7ae
commit
be4a18165f
2 changed files with 30 additions and 26 deletions
|
@ -8,6 +8,7 @@ psize=Psize.dat
|
||||||
hires_step=0.5
|
hires_step=0.5
|
||||||
|
|
||||||
[out]
|
[out]
|
||||||
|
no_breakwater=True
|
||||||
root=out
|
root=out
|
||||||
sub=bathy_sub.npy
|
sub=bathy_sub.npy
|
||||||
out=bathy.npy
|
out=bathy.npy
|
||||||
|
|
|
@ -99,6 +99,12 @@ x_max_hires = x[z_crossing] + (
|
||||||
log.debug(f"Replacing range: [{x_min_hires},{x_max_hires}]")
|
log.debug(f"Replacing range: [{x_min_hires},{x_max_hires}]")
|
||||||
|
|
||||||
flt_x = (x > x_min_hires) & (x < x_max_hires)
|
flt_x = (x > x_min_hires) & (x < x_max_hires)
|
||||||
|
hstru = np.zeros(z.shape)
|
||||||
|
poro = np.zeros(z.shape)
|
||||||
|
psize = np.zeros(z.shape)
|
||||||
|
if config.getboolean("out", "no_breakwater", fallback=False):
|
||||||
|
z[flt_x] = z[flt_x][-1]
|
||||||
|
else:
|
||||||
z[flt_x] = interpolate.griddata(
|
z[flt_x] = interpolate.griddata(
|
||||||
(bathy_hires[:, 0],),
|
(bathy_hires[:, 0],),
|
||||||
bathy_hires[:, 1],
|
bathy_hires[:, 1],
|
||||||
|
@ -106,7 +112,6 @@ z[flt_x] = interpolate.griddata(
|
||||||
)
|
)
|
||||||
|
|
||||||
hstru_in = np.loadtxt(hstru_inp)[::-1]
|
hstru_in = np.loadtxt(hstru_inp)[::-1]
|
||||||
hstru = np.zeros(z.shape)
|
|
||||||
hstru[flt_x] = interpolate.griddata(
|
hstru[flt_x] = interpolate.griddata(
|
||||||
(bathy_hires[:,0],),
|
(bathy_hires[:,0],),
|
||||||
hstru_in,
|
hstru_in,
|
||||||
|
@ -114,7 +119,6 @@ hstru[flt_x] = interpolate.griddata(
|
||||||
)
|
)
|
||||||
|
|
||||||
poro_in = np.loadtxt(poro_inp)[::-1]
|
poro_in = np.loadtxt(poro_inp)[::-1]
|
||||||
poro = np.zeros(z.shape)
|
|
||||||
poro[flt_x] = interpolate.griddata(
|
poro[flt_x] = interpolate.griddata(
|
||||||
(bathy_hires[:,0],),
|
(bathy_hires[:,0],),
|
||||||
poro_in,
|
poro_in,
|
||||||
|
@ -122,7 +126,6 @@ poro[flt_x] = interpolate.griddata(
|
||||||
)
|
)
|
||||||
|
|
||||||
psize_in = np.loadtxt(psize_inp)[::-1]
|
psize_in = np.loadtxt(psize_inp)[::-1]
|
||||||
psize = np.zeros(z.shape)
|
|
||||||
psize[flt_x] = interpolate.griddata(
|
psize[flt_x] = interpolate.griddata(
|
||||||
(bathy_hires[:,0],),
|
(bathy_hires[:,0],),
|
||||||
psize_in,
|
psize_in,
|
||||||
|
|
Loading…
Reference in a new issue