Add swash model nobreakwater
This commit is contained in:
parent
ff7d5380a8
commit
c4c751721b
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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"):
|
||||
|
|
Loading…
Reference in a new issue