1
Fork 0

Minor tweaks to swash post-processing

This commit is contained in:
Edgar P. Burkhart 2022-03-29 15:34:26 +02:00
parent 4f6ad7edba
commit 52d6718d70
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ config.read(args.config)
inp = pathlib.Path(config.get("post", "inp")) inp = pathlib.Path(config.get("post", "inp"))
root = pathlib.Path(config.get("swash", "out")) root = pathlib.Path(config.get("swash", "out"))
out = pathlib.Path(config.get("plot", "out")) out = pathlib.Path(config.get("plot", "out"))
out.mkdir(exist_ok=True) out.mkdir(parents=True, exist_ok=True)
def data(var): def data(var):

View file

@ -22,7 +22,7 @@ config.read(args.config)
inp = pathlib.Path(config.get("post", "inp")) inp = pathlib.Path(config.get("post", "inp"))
root = pathlib.Path(config.get("swash", "out")) root = pathlib.Path(config.get("swash", "out"))
out = pathlib.Path(config.get("plot", "out")) out = pathlib.Path(config.get("plot", "out"))
out.mkdir(exist_ok=True) out.mkdir(parents=True, exist_ok=True)
def data(var): def data(var):

View file

@ -13,7 +13,7 @@ class ReadSwash:
@classmethod @classmethod
def read_nohead(cls, path): def read_nohead(cls, path):
subprocess.run(("sed", "-i", r"s/ /\n/g", path)) subprocess.run(("sed", "-i", r"s/\s\+/\n/g", path))
return np.loadtxt(path) return np.loadtxt(path)
def read_time(self, path): def read_time(self, path):

View file

@ -40,7 +40,7 @@ var = {
} }
inp.mkdir(exist_ok=True) inp.mkdir(exist_ok=True)
with ThreadPool() as pool: with ThreadPool(len(var)) as pool:
log.info("Converting all data") log.info("Converting all data")
pool.map( pool.map(
lambda x: np.save( lambda x: np.save(