From 0a122f76f38b5fa2bca104b7dfd79ffdcc33b0af Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 30 Mar 2022 12:42:09 +0200 Subject: [PATCH] Updated projection without breakwater --- data/config-nb.ini | 3 ++- data/processing/projection.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/config-nb.ini b/data/config-nb.ini index 9b94756..4f1f7ab 100644 --- a/data/config-nb.ini +++ b/data/config-nb.ini @@ -8,12 +8,13 @@ psize=Psize.dat hires_step=0.5 [out] +margin=0.005 no_breakwater=True root=out_nb sub=bathy_sub.npy out=bathy.npy step=1 -left=0 +left=-300 right=150 [artha] diff --git a/data/processing/projection.py b/data/processing/projection.py index 8e4f3ca..0aa1e16 100644 --- a/data/processing/projection.py +++ b/data/processing/projection.py @@ -91,13 +91,14 @@ x_min_hires = x[z_crossing] + (bathy_hires[:, 0].min() - bathy_hires[hires_cross x_max_hires = x[z_crossing] + (bathy_hires[:, 0].max() - bathy_hires[hires_crossing, 0]) log.debug(f"Replacing range: [{x_min_hires},{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] + flt_x = np.abs(x) < 250 + z[flt_x] = np.linspace(z[flt_x][0], z[flt_x][-1], flt_x.sum()) else: + flt_x = (x > x_min_hires) & (x < x_max_hires) z[flt_x] = interpolate.griddata( (bathy_hires[:, 0],), bathy_hires[:, 1],