Added postprocessing script

This commit is contained in:
Edgar P. Burkhart 2022-03-02 14:25:53 +01:00
parent dca8114bb9
commit a9570bf333
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
4 changed files with 60 additions and 0 deletions

26
swash/processing/post.py Normal file
View file

@ -0,0 +1,26 @@
import configparser
import pathlib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from .read_swash import *
config = configparser.ConfigParser()
config.read("config.ini")
cache = pathlib.Path(config.get("out", "root"))
root = pathlib.Path(config.get("swash", "out"))
bathy = pd.read_hdf(cache.joinpath("bathy.h5"), "bathy")
n = bathy.index.size
botl = read_nohead_scalar(root.joinpath("botl.dat"), n)
dep = read_nohead_scalar(root.joinpath("dep.dat"), n)
watl = read_nohead_scalar(root.joinpath("watl.dat"), n)
plt.plot(dep.T-botl.T, label="dep")
plt.plot(-botl.T[:, 0], label="botl")
plt.show(block=True)