Switched to new storage convention for swash output in sws_ola
This commit is contained in:
parent
b557712372
commit
71049d49ea
63 changed files with 174 additions and 5717 deletions
|
@ -1,39 +1,3 @@
|
|||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
import numpy as np
|
||||
|
||||
from .stl import stl_from_1d
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Convert swash output to olaFlow input"
|
||||
)
|
||||
parser.add_argument("-v", "--verbose", action="count", default=0)
|
||||
args = parser.parse_args()
|
||||
|
||||
logging.basicConfig(level=max((10, 20 - 10 * args.verbose)))
|
||||
log = logging.getLogger("sws_ola")
|
||||
|
||||
log.info("Starting sws -> olaFlow converter")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
bathy = np.loadtxt(config.get("bathy", "bathy"))
|
||||
poro = bathy + np.loadtxt(config.get("bathy", "hstru"))
|
||||
|
||||
out = pathlib.Path(config.get("bathy", "out"))
|
||||
out.mkdir(exist_ok=True)
|
||||
stl_from_1d(
|
||||
bathy,
|
||||
out.joinpath("bathy.stl"),
|
||||
config.get("bathy", "scale", fallback=[1, 1, 1]),
|
||||
config.get("bathy", "translate", fallback=[0, 0, 0]),
|
||||
)
|
||||
stl_from_1d(
|
||||
poro,
|
||||
out.joinpath("poro.stl"),
|
||||
config.get("bathy", "scale", fallback=[1, 1, 1]),
|
||||
config.get("bathy", "translate", fallback=[0, 0, 0]),
|
||||
)
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f12d83a60bae2c19ae50e105a1b2176d5d35cb17d9e9d73f10aefdf225a4003
|
||||
size 1024
|
||||
|
|
Reference in a new issue