From dca8114bb963eaaa755085f1adcfe3721fe808b5 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 2 Mar 2022 12:24:23 +0100 Subject: [PATCH] Added creation of output dir --- swash/processing/bathy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/swash/processing/bathy.py b/swash/processing/bathy.py index 1574817..b21118a 100644 --- a/swash/processing/bathy.py +++ b/swash/processing/bathy.py @@ -65,6 +65,7 @@ log.info( if config.has_section("out"): out = pathlib.Path(config.get("out", "root")) log.info(f"Writing output data to '{out}'") + out.mkdir(exist_ok=True) np.savetxt(out.joinpath("bathy.dat"), bathy.z, newline=" ") np.savetxt(out.joinpath("hstru.dat"), bathy.hstru, newline=" ") np.savetxt(out.joinpath("poro.dat"), bathy.poro, newline=" ")