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"))
root = pathlib.Path(config.get("swash", "out"))
out = pathlib.Path(config.get("plot", "out"))
out.mkdir(exist_ok=True)
out.mkdir(parents=True, exist_ok=True)
def data(var):

View File

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

View File

@ -13,7 +13,7 @@ class ReadSwash:
@classmethod
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)
def read_time(self, path):

View File

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