From 35ab13bea4456f0c6fba9542c1b9fa2f46a58361 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 29 Mar 2022 15:24:17 +0200 Subject: [PATCH] Added margin option to subdomain config --- data/config.ini | 1 + data/processing/subdomain.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/config.ini b/data/config.ini index 6fd5983..b9b2d50 100644 --- a/data/config.ini +++ b/data/config.ini @@ -8,6 +8,7 @@ psize=Psize.dat hires_step=0.5 [out] +margin=0.005 #no_breakwater=True root=out sub=bathy_sub.npy diff --git a/data/processing/subdomain.py b/data/processing/subdomain.py index 06e3c16..8ccc6a4 100644 --- a/data/processing/subdomain.py +++ b/data/processing/subdomain.py @@ -26,8 +26,9 @@ domain = np.stack((artha, buoy)) domain.sort(axis=0) log.debug(f"domain: {domain}") -domain[0] -= 0.002 -domain[1] += 0.002 +margin = config.getfloat("out", "margin", default=0.002) +domain[0] -= margin +domain[1] += margin log.debug(f"domain: {domain}") inp_root = pathlib.Path(config.get("inp", "root"))