From 2c66240cc3e9a7fc1202e5f41994fa5029d44d3d Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 15 Jul 2026 15:43:06 +0200 Subject: [PATCH 01/20] Add loading efficiency to plot --- timflow/transient/inhom1d.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index e903f997..af7f6260 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -376,6 +376,8 @@ def plot( paramtxt = khstr + kh_unitstr + "\n" + sstr + ss_unitstr else: paramtxt = khstr + kh_unitstr + sep + sstr + ss_unitstr + if self.leffaq[aqi] != 0: + paramtxt += f"{sep}load eff = {self.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, np.mean(self.z[i : i + 2]), From 1552f519f149e786d38ae9a622a6a57ef27ad325 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 10:36:38 +0200 Subject: [PATCH 02/20] change symbol to beta and add for leaky layers --- .vscode/settings.json | 9 +++++++++ timflow/transient/inhom1d.py | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..1c49803f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "python-envs.pythonProjects": [ + { + "path": ".", + "envManager": "ms-python.python:venv", + "packageManager": "ms-python.python:pip" + } + ] +} \ No newline at end of file diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index af7f6260..15f94687 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -341,6 +341,8 @@ def plot( paramtxt = cstr_with_unit + sep + sstr_with_unit else: paramtxt = cstr_with_unit + sep + sstr_with_unit + if self.leffll[lli] != 0: + paramtxt += f"{sep}$\\beta$ = {self.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, np.mean(self.z[i : i + 2]), @@ -377,7 +379,7 @@ def plot( else: paramtxt = khstr + kh_unitstr + sep + sstr + ss_unitstr if self.leffaq[aqi] != 0: - paramtxt += f"{sep}load eff = {self.leffaq[aqi]:{fmt}}" + paramtxt += f"{sep}$\\beta$ = {self.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, np.mean(self.z[i : i + 2]), From 56d59c7542a9e8f026555978cb154ec852f5e066 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 12:13:01 +0200 Subject: [PATCH 03/20] Fix beta (loading efficiency) not showing for confined-top leaky layers param_maq never broadcast/padded leffaq and leffll in the confined/ phreatic-top branch, unlike c/Sll/porll, so leffll was off-by-one relative to the lli index used when plotting. Also add the missing beta line to plots.py's standalone xsection implementation, which never had it (unlike inhom1d.py's Xsection.plot). --- timflow/plots/plots.py | 4 ++++ timflow/transient/aquifer_parameters.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index 569fda8f..d18d497e 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -661,6 +661,8 @@ def _xsection_leaky_layer_params( c_unitstr = "" ss_unitstr = "" paramtxt = cstr + c_unitstr + sep + sstr + ss_unitstr + if self._ml.aq.leffll[lli] != 0: + paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, @@ -731,6 +733,8 @@ def _xsection_aquifer_params( paramtxt += f"{sep}$S$ = {self._ml.aq.Saq[aqi]:{fmt}}" else: paramtxt += f"{sep}$S_s$ = {self._ml.aq.Saq[aqi]:{ssfmt}}" + ss_unitstr + if self._ml.aq.leffaq[aqi] != 0: + paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index 146f9843..ef5c28e2 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -48,12 +48,18 @@ def param_maq( Sll = Sll * np.ones(naq - 1) if len(porll) == 1: porll = porll * np.ones(naq - 1) + if len(leffaq) == 1: + leffaq = leffaq * np.ones(naq) + if len(leffll) == 1: + leffll = leffll * np.ones(naq - 1) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) assert len(c) == naq - 1, "Error: Length of c needs to be " + str(naq - 1) assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) + assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) + assert len(leffll) == naq - 1, "Error: Length of leffll needs to be " + str(naq - 1) Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] @@ -63,6 +69,7 @@ def param_maq( Sll = np.hstack((1e-20, Sll)) Hll = np.hstack((1e-20, Hll)) porll = np.hstack((1e-20, porll)) + leffll = np.hstack((0, leffll)) # layertype nlayers = len(z) - 1 ltype = np.array(nlayers * ["a"]) From 37b280cca3e169750f4e134dec7c24261cc0a7e5 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 12:57:48 +0200 Subject: [PATCH 04/20] Revert "Fix beta (loading efficiency) not showing for confined-top leaky layers" This reverts commit 56d59c7542a9e8f026555978cb154ec852f5e066. --- timflow/plots/plots.py | 4 ---- timflow/transient/aquifer_parameters.py | 7 ------- 2 files changed, 11 deletions(-) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index d18d497e..569fda8f 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -661,8 +661,6 @@ def _xsection_leaky_layer_params( c_unitstr = "" ss_unitstr = "" paramtxt = cstr + c_unitstr + sep + sstr + ss_unitstr - if self._ml.aq.leffll[lli] != 0: - paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, @@ -733,8 +731,6 @@ def _xsection_aquifer_params( paramtxt += f"{sep}$S$ = {self._ml.aq.Saq[aqi]:{fmt}}" else: paramtxt += f"{sep}$S_s$ = {self._ml.aq.Saq[aqi]:{ssfmt}}" + ss_unitstr - if self._ml.aq.leffaq[aqi] != 0: - paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index ef5c28e2..146f9843 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -48,18 +48,12 @@ def param_maq( Sll = Sll * np.ones(naq - 1) if len(porll) == 1: porll = porll * np.ones(naq - 1) - if len(leffaq) == 1: - leffaq = leffaq * np.ones(naq) - if len(leffll) == 1: - leffll = leffll * np.ones(naq - 1) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) assert len(c) == naq - 1, "Error: Length of c needs to be " + str(naq - 1) assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) - assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) - assert len(leffll) == naq - 1, "Error: Length of leffll needs to be " + str(naq - 1) Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] @@ -69,7 +63,6 @@ def param_maq( Sll = np.hstack((1e-20, Sll)) Hll = np.hstack((1e-20, Hll)) porll = np.hstack((1e-20, porll)) - leffll = np.hstack((0, leffll)) # layertype nlayers = len(z) - 1 ltype = np.array(nlayers * ["a"]) From 3a259378d3bb5aafd154c27e91345654216d0e28 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 12:58:22 +0200 Subject: [PATCH 05/20] Show beta (loading efficiency) for aquifers in ml.plots.xsection() inhom1d.py's Xsection.plot already showed leffaq as beta text, but plots.py's separate xsection implementation (used by regular ModelMaq/Model3D models) never had it. leffll (leaky layer beta) is not added here since this branch has no leffll plumbing yet -- that depends on the head_in_leaky_layer work. --- timflow/plots/plots.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index 569fda8f..09cc7a6d 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -731,6 +731,8 @@ def _xsection_aquifer_params( paramtxt += f"{sep}$S$ = {self._ml.aq.Saq[aqi]:{fmt}}" else: paramtxt += f"{sep}$S_s$ = {self._ml.aq.Saq[aqi]:{ssfmt}}" + ss_unitstr + if self._ml.aq.leffaq[aqi] != 0: + paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From b41ee9a2a86b6b2925639fe98cfe631053fc3d3c Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 13:02:12 +0200 Subject: [PATCH 06/20] Prepare plots.py xsection for coming leffll (leaky layer beta) support Guarded with hasattr since this branch doesn't have leffll plumbed into AquiferData yet (that lands with the head_in_leaky_layer work). Once it is, beta will show for leaky layers here too, same as it already does for aquifers. --- timflow/plots/plots.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index 09cc7a6d..f9dcb362 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -661,6 +661,8 @@ def _xsection_leaky_layer_params( c_unitstr = "" ss_unitstr = "" paramtxt = cstr + c_unitstr + sep + sstr + ss_unitstr + if hasattr(self._ml.aq, "leffll") and self._ml.aq.leffll[lli] != 0: + paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From c3dd6365a0a1e0a34b324c325ca67ed60b307a45 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 13:03:27 +0200 Subject: [PATCH 07/20] Fix crash in Xsection.plot when leffll is not available self.leffll was referenced unconditionally, but this branch doesn't plumb leffll through AquiferData yet, so plotting params on any confined model with a leaky layer raised AttributeError. Guard with hasattr, consistent with the same guard just added in plots.py. --- timflow/transient/inhom1d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index 15f94687..de0f48a2 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -341,7 +341,7 @@ def plot( paramtxt = cstr_with_unit + sep + sstr_with_unit else: paramtxt = cstr_with_unit + sep + sstr_with_unit - if self.leffll[lli] != 0: + if hasattr(self, "leffll") and self.leffll[lli] != 0: paramtxt += f"{sep}$\\beta$ = {self.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From 70e7c503161e6273d9b42bc340389f49424ccddb Mon Sep 17 00:00:00 2001 From: Mattijs Borst <41747007+MattBrst@users.noreply.github.com> Date: Wed, 2 Sep 2026 13:05:53 +0200 Subject: [PATCH 08/20] Delete .vscode/settings.json --- .vscode/settings.json | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 1c49803f..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "python-envs.pythonProjects": [ - { - "path": ".", - "envManager": "ms-python.python:venv", - "packageManager": "ms-python.python:pip" - } - ] -} \ No newline at end of file From fa012bfaf8d4e7155391ef0a4a4db32a137b03e7 Mon Sep 17 00:00:00 2001 From: Mattijs Borst Date: Wed, 2 Sep 2026 13:15:32 +0200 Subject: [PATCH 09/20] Fix IndexError: leffaq not broadcast for confined-top aquifers param_maq's confined/phreatic branch never broadcast leffaq to naq (unlike the leaky-top branch, which does), so leffaq stayed length 1 for any multi-aquifer confined model. Dormant since the original loading-efficiency commit; surfaced now because ml.plots.xsection() and Xsection.plot() both index leffaq[aqi] for aqi up to naq-1. --- timflow/transient/aquifer_parameters.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index 146f9843..c246ac81 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -48,12 +48,15 @@ def param_maq( Sll = Sll * np.ones(naq - 1) if len(porll) == 1: porll = porll * np.ones(naq - 1) + if len(leffaq) == 1: + leffaq = leffaq * np.ones(naq) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) assert len(c) == naq - 1, "Error: Length of c needs to be " + str(naq - 1) assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) + assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] From 54b4c0bd90cf6e5b5855b88af300753b5bb93432 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:36:03 +0200 Subject: [PATCH 10/20] final touches leffaq and leffll - set Sll to 0.0 if <= 1e-20 - merge dev --- timflow/plots/plots.py | 6 +++++- timflow/transient/aquifer_parameters.py | 3 +++ timflow/transient/inhom1d.py | 10 +++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index f9dcb362..955f7105 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -652,7 +652,11 @@ def _xsection_leaky_layer_params( # Transient: resistance c and storage Sll ssfmt = ".2e" cstr = f"$c$ = {self._ml.aq.c[lli]:{fmt}}" - sstr = f"$S_s$ = {self._ml.aq.Sll[lli]:{ssfmt}}" + Slli = self._ml.aq.Sll[lli] + if Slli > 1e-20: + sstr = f"$S_s$ = {Slli:{ssfmt}}" + else: + sstr = "$S_s$ = 0.0" if units is not None: c_unitstr = f" {units['c']}" if "c" in units else "" # Prefer Sll unit; fall back to Saq for compatibility. diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index d96f9c83..e10c0f76 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -52,6 +52,8 @@ def param_maq( porll = porll * np.ones(naq - 1) if len(leffaq) == 1: leffaq = leffaq * np.ones(naq) + if len(leffll) == 1: + leffll = leffll * np.ones(naq) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) @@ -59,6 +61,7 @@ def param_maq( assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) + assert len(leffll) == naq, "Error: Length of leffll needs to be " + str(naq) Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index 8cc21108..c3093cdd 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -338,14 +338,18 @@ def plot( ) if params: cstr = f"$c$ = {self.c[lli]:{fmt}}" - sstr = f"$S_s$ = {self.Sll[lli]:{ssfmt}}" + Slli = self.Sll[lli] + if Slli > 1e-20: + sstr = f"$S_s$ = {Slli:{ssfmt}}" + else: + sstr = "$S_s$ = 0.0" cstr_with_unit = cstr + c_unitstr sstr_with_unit = sstr + ss_unitstr if sep == "\n": paramtxt = cstr_with_unit + sep + sstr_with_unit else: paramtxt = cstr_with_unit + sep + sstr_with_unit - if hasattr(self, "leffll") and self.leffll[lli] != 0: + if hasattr(self, "leffll") and self.leffll[lli] != 0.0: paramtxt += f"{sep}$\\beta$ = {self.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, @@ -382,7 +386,7 @@ def plot( paramtxt = khstr + kh_unitstr + "\n" + sstr + ss_unitstr else: paramtxt = khstr + kh_unitstr + sep + sstr + ss_unitstr - if self.leffaq[aqi] != 0: + if self.leffaq[aqi] != 0.0: paramtxt += f"{sep}$\\beta$ = {self.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From ea07b705f9a537f0f7990ecd605b4b5c9e368b77 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:39:03 +0200 Subject: [PATCH 11/20] check if aq has leffaq --- timflow/plots/plots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timflow/plots/plots.py b/timflow/plots/plots.py index 955f7105..56235c88 100644 --- a/timflow/plots/plots.py +++ b/timflow/plots/plots.py @@ -652,7 +652,7 @@ def _xsection_leaky_layer_params( # Transient: resistance c and storage Sll ssfmt = ".2e" cstr = f"$c$ = {self._ml.aq.c[lli]:{fmt}}" - Slli = self._ml.aq.Sll[lli] + Slli = self._ml.aq.Sll[lli] if Slli > 1e-20: sstr = f"$S_s$ = {Slli:{ssfmt}}" else: @@ -737,7 +737,7 @@ def _xsection_aquifer_params( paramtxt += f"{sep}$S$ = {self._ml.aq.Saq[aqi]:{fmt}}" else: paramtxt += f"{sep}$S_s$ = {self._ml.aq.Saq[aqi]:{ssfmt}}" + ss_unitstr - if self._ml.aq.leffaq[aqi] != 0: + if hasattr(self._ml.aq, "leffaq") and self._ml.aq.leffaq[aqi] != 0: paramtxt += f"{sep}$\\beta$ = {self._ml.aq.leffaq[aqi]:{fmt}}" ax.text( From 294c31a78dd3205bb3e580489d844fbd0915f26d Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:42:53 +0200 Subject: [PATCH 12/20] correct check for confined models --- timflow/transient/aquifer_parameters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index e10c0f76..9ad78b2c 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -53,7 +53,7 @@ def param_maq( if len(leffaq) == 1: leffaq = leffaq * np.ones(naq) if len(leffll) == 1: - leffll = leffll * np.ones(naq) + leffll = leffll * np.ones(naq - 1) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) @@ -61,7 +61,7 @@ def param_maq( assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) - assert len(leffll) == naq, "Error: Length of leffll needs to be " + str(naq) + assert len(leffll) == naq - 1, "Error: Length of leffll needs to be " + str(naq - 1) Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] From c618902c522e3fdff1883c4102adbd4c9db00c73 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:49:05 +0200 Subject: [PATCH 13/20] leffaq and leffll in confined case don't do anything, set to 0.0 always, but use correct layer dimensions --- timflow/transient/aquifer_parameters.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index 9ad78b2c..a68982f1 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -51,17 +51,16 @@ def param_maq( if len(porll) == 1: porll = porll * np.ones(naq - 1) if len(leffaq) == 1: - leffaq = leffaq * np.ones(naq) + leffaq = np.zeros(naq) if len(leffll) == 1: - leffll = leffll * np.ones(naq - 1) + leffll = np.zeros(naq - 1) assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) assert len(c) == naq - 1, "Error: Length of c needs to be " + str(naq - 1) assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) - assert len(leffaq) == naq, "Error: Length of leffaq needs to be " + str(naq) - assert len(leffll) == naq - 1, "Error: Length of leffll needs to be " + str(naq - 1) + Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] From 475e8ed17ff873fde4f856996f8beff0f2f03261 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:49:46 +0200 Subject: [PATCH 14/20] remove newline --- timflow/transient/aquifer_parameters.py | 1 - 1 file changed, 1 deletion(-) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index a68982f1..a604dbd6 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -60,7 +60,6 @@ def param_maq( assert len(c) == naq - 1, "Error: Length of c needs to be " + str(naq - 1) assert len(Sll) == naq - 1, "Error: Length of Sll needs to be " + str(naq - 1) assert len(porll) == naq - 1, "Error: Length of porll needs to be " + str(naq - 1) - Haq = H[::2] assert np.all(Haq > 0), "Error: Some thicknesses of aquifer layers are negative" Hll = H[1::2] From 0b572ece1d778878a91cd07c62d567a1f33dcfd8 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:51:15 +0200 Subject: [PATCH 15/20] final fix? --- timflow/transient/inhom1d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index c3093cdd..2d82e192 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -386,7 +386,7 @@ def plot( paramtxt = khstr + kh_unitstr + "\n" + sstr + ss_unitstr else: paramtxt = khstr + kh_unitstr + sep + sstr + ss_unitstr - if self.leffaq[aqi] != 0.0: + if hasattr(self, "leffaq") and self.leffaq[aqi] != 0.0: paramtxt += f"{sep}$\\beta$ = {self.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From c7d67b497fcdc1b4f689529c334ffc7d73a271fd Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:52:29 +0200 Subject: [PATCH 16/20] ok now, mixed up plot vs inhom1d files before --- timflow/transient/inhom1d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index 2d82e192..11a5e93c 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -349,7 +349,7 @@ def plot( paramtxt = cstr_with_unit + sep + sstr_with_unit else: paramtxt = cstr_with_unit + sep + sstr_with_unit - if hasattr(self, "leffll") and self.leffll[lli] != 0.0: + if self.leffll[lli] != 0.0: paramtxt += f"{sep}$\\beta$ = {self.leffll[lli]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, @@ -386,7 +386,7 @@ def plot( paramtxt = khstr + kh_unitstr + "\n" + sstr + ss_unitstr else: paramtxt = khstr + kh_unitstr + sep + sstr + ss_unitstr - if hasattr(self, "leffaq") and self.leffaq[aqi] != 0.0: + if self.leffaq[aqi] != 0.0: paramtxt += f"{sep}$\\beta$ = {self.leffaq[aqi]:{fmt}}" ax.text( r0 + 0.75 * r if labels else r0 + 0.5 * r, From a10dbcdfa4938c4c725a8ff3a4e1d1063d19b627 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 15:58:10 +0200 Subject: [PATCH 17/20] always set leffaq/leffll to 0.0 for confined case --- timflow/transient/aquifer_parameters.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index a604dbd6..ed3522ef 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -50,10 +50,8 @@ def param_maq( Sll = Sll * np.ones(naq - 1) if len(porll) == 1: porll = porll * np.ones(naq - 1) - if len(leffaq) == 1: - leffaq = np.zeros(naq) - if len(leffll) == 1: - leffll = np.zeros(naq - 1) + leffaq = np.zeros(naq) # always 0.0, regardless of user input + leffll = np.zeros(naq - 1) # always 0.0, regardless of user input assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) From d7d5261eb1f84a4404bff14b28cf9ed3f3588582 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 8 Sep 2026 18:13:33 +0200 Subject: [PATCH 18/20] ok leffll should be naq as well --- timflow/transient/aquifer_parameters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timflow/transient/aquifer_parameters.py b/timflow/transient/aquifer_parameters.py index ed3522ef..7b0c67aa 100644 --- a/timflow/transient/aquifer_parameters.py +++ b/timflow/transient/aquifer_parameters.py @@ -51,7 +51,7 @@ def param_maq( if len(porll) == 1: porll = porll * np.ones(naq - 1) leffaq = np.zeros(naq) # always 0.0, regardless of user input - leffll = np.zeros(naq - 1) # always 0.0, regardless of user input + leffll = np.zeros(naq) # always 0.0, regardless of user input assert len(kaq) == naq, "Error: Length of kaq needs to be " + str(naq) assert len(Saq) == naq, "Error: Length of Saq needs to be " + str(naq) assert len(poraq) == naq, "Error: Length of poraq needs to be " + str(naq) From 88c3cdd702f2287d7d382b1ba47140daf9d86bf7 Mon Sep 17 00:00:00 2001 From: Mark Bakker Date: Tue, 8 Sep 2026 22:22:31 +0200 Subject: [PATCH 19/20] add new loading eff notebook to docs --- docs/transient/05benchmarks/index.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/transient/05benchmarks/index.rst b/docs/transient/05benchmarks/index.rst index 4dd43d9f..19363bc5 100644 --- a/docs/transient/05benchmarks/index.rst +++ b/docs/transient/05benchmarks/index.rst @@ -18,6 +18,7 @@ timflow solutions or understand the numerical accuracy of specific features. - :doc:`synthetic_test_calibrate` - :doc:`synthetic_calibrate_2aquifers` - :doc:`river1d` +- :doc:`river1d_2layer_mf6.ipynb` .. toctree:: :maxdepth: 3 @@ -34,4 +35,5 @@ timflow solutions or understand the numerical accuracy of specific features. validation_tidal_wave_with_Bruggeman synthetic_test_calibrate synthetic_calibrate_2aquifers - river1d \ No newline at end of file + river1d + river1d_2layer_mf6.ipynb \ No newline at end of file From 5e2446f9cbafb82c7ef6dc8fa4b9bb86688d4025 Mon Sep 17 00:00:00 2001 From: Mark Bakker Date: Tue, 8 Sep 2026 22:40:30 +0200 Subject: [PATCH 20/20] update loading eff doc string for xsection models --- timflow/transient/inhom1d.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/timflow/transient/inhom1d.py b/timflow/transient/inhom1d.py index 11a5e93c..3942a477 100644 --- a/timflow/transient/inhom1d.py +++ b/timflow/transient/inhom1d.py @@ -47,8 +47,10 @@ class Xsection(AquiferData): Specific storage of the leaky layers. leffaq : array loading efficiency of the aquifer + only used when topboundary='semi' and hstar varies with time leffll : array loading efficiency of the leaky layer + only used when topboundary='semi' and hstar varies with time poraq : array Porosities of the aquifers. porll : array @@ -437,8 +439,10 @@ class XsectionMaq(Xsection): Specific storage of the leaky layers. leffaq : array loading efficiency of the aquifer + only used when topboundary='semi' and hstar varies with time leffll : array loading efficiency of the leaky layer + only used when topboundary='semi' and hstar varies with time poraq : array Porosities of the aquifers. porll : array @@ -539,9 +543,11 @@ class Xsection3D(Xsection): Ratio of vertical hydraulic conductivity to horizontal hydraulic conductivity. leffaq : array - Loading efficiency + loading efficiency of the aquifer + only used when topboundary='semi' and hstar varies with time leffll : array loading efficiency of the leaky layer + only used when topboundary='semi' and hstar varies with time poraq : array Porosities of the aquifers. topboundary : string, 'confined', 'phreatic', or 'semi' (default is 'conf')