Added postprocessing script
This commit is contained in:
parent
dca8114bb9
commit
a9570bf333
4 changed files with 60 additions and 0 deletions
26
swash/processing/post.py
Normal file
26
swash/processing/post.py
Normal 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)
|
Reference in a new issue