1
Fork 0

Add swash model nobreakwater

This commit is contained in:
Edgar P. Burkhart 2022-03-07 12:42:11 +01:00
parent ff7d5380a8
commit c4c751721b
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 6 additions and 1 deletions

View file

@ -12,6 +12,7 @@ out=out_data
out_nb=out_data_nb
[swash]
nb=True
input=sws/INPUT.sws
path=/opt/swash
out=out_sws

View file

@ -30,8 +30,12 @@ with tempfile.TemporaryDirectory(prefix="swash_", dir=".") as tmp_raw:
log.info(f"Copying files to '{tmpdir}'")
shutil.copy2(inp, tmpdir)
if config.getboolean("swash", "nb", fallback=False):
path = pathlib.Path(config.get("data", "out_nb"))
else:
path = pathlib.Path(config.get("data", "out"))
shutil.copytree(
pathlib.Path(config.get("data", "out")), tmpdir, dirs_exist_ok=True
path, tmpdir, dirs_exist_ok=True
)
if config.has_option("swash", "mpi"):