From e664259e61a63a24e78fe7274e2ca6d06bb6b75c Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Thu, 14 Apr 2022 09:59:09 +0200 Subject: [PATCH] sws_ola adjust layered zk to water level --- olaflow/processing/sws_ola.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/olaflow/processing/sws_ola.py b/olaflow/processing/sws_ola.py index 813dff6..a8d9f60 100644 --- a/olaflow/processing/sws_ola.py +++ b/olaflow/processing/sws_ola.py @@ -44,10 +44,11 @@ olaflow_root = args.output model = OFModel(olaflow_root) model.read_mesh() -watl_t = interpolate.interp1d(x, watl[arg_t0] + config.getfloat("bathy", "level", fallback=0.)) +level = config.getfloat("bathy", "level", fallback=0.) +watl_t = interpolate.interp1d(x, watl[arg_t0] + level) alpha_water = np.where(model.z < watl_t(model.x), 1, 0) -zk_t = interpolate.interp1d(x, zk[arg_t0]) +zk_t = interpolate.interp1d(x, zk[arg_t0] + level) velk_t = interpolate.interp1d(x, velk[arg_t0, :, :])(model.x) vz_t = interpolate.interp1d(x, vz[arg_t0])(model.x) zk_tl = zk_t(model.x)