From a8e5226a226485f69ffb8c227e301a3dd09a97d9 Mon Sep 17 00:00:00 2001 From: mjreno Date: Mon, 17 Nov 2025 12:54:51 -0500 Subject: [PATCH] fix __file__ not defined in notebook --- docs/examples/twri.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/twri.py b/docs/examples/twri.py index ed4acc64..a33090cb 100644 --- a/docs/examples/twri.py +++ b/docs/examples/twri.py @@ -173,7 +173,7 @@ def plot_head(head, workspace): tdis = flopy4.mf6.simulation.Tdis.from_time(time) # Create workspace -workspace = Path(__file__).parent / "twri" / "list_stresspkg" +workspace = Path.cwd() / "twri" / "list_stresspkg" workspace.mkdir(parents=True, exist_ok=True) # Create simulation @@ -260,7 +260,7 @@ def plot_head(head, workspace): gwf.rcha = [rcha] # create new workspace -workspace = Path(__file__).parent / "twri" / "array_stresspkg" +workspace = Path.cwd() / "twri" / "array_stresspkg" workspace.mkdir(parents=True, exist_ok=True) sim.workspace = workspace