LFS wtf
This commit is contained in:
parent
71049d49ea
commit
ba675fb763
68 changed files with 5727 additions and 204 deletions
6
swash/.gitignore
vendored
6
swash/.gitignore
vendored
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:483eba7c2aaf6013155873bc675ab40e96c433a9c31b8dd056af8049c1f7d3c7
|
||||
size 31
|
||||
/inp*
|
||||
/out*
|
||||
/swash_buoytoartha
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:81e07a16f52e1a07ab145ebb68357d54d37656432009e40e5a88eb0439bccbae
|
||||
size 323
|
||||
[proc]
|
||||
#plot=True
|
||||
|
||||
[data]
|
||||
root=data
|
||||
hires=bathyhires.dat
|
||||
bathy=buoyarthabathy.dat
|
||||
hstru=Hstru.dat
|
||||
poro=Poro.dat
|
||||
psize=Psize.dat
|
||||
out=out_data
|
||||
out_nb=out_data_nb
|
||||
|
||||
[swash]
|
||||
nb=True
|
||||
input=sws/INPUT.sws
|
||||
path=/opt/swash
|
||||
out=out_sws
|
||||
mpi=4
|
||||
|
||||
[post]
|
||||
inp=inp_post
|
||||
compare=inp_post_nb
|
||||
out=out_post
|
||||
#nperseg=1024
|
||||
dt=0.25
|
||||
x0=-1250
|
||||
t0=180
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:752dec83ecb9ee7fb94f4b1d2f46ce0e4ebbf504002714b798e704fd705e64e8
|
||||
size 2639
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.09053913636363475 0.12857195454545334 0.1106843636363628 0.08742181818181649 0.05449704545454637 0.19579977272727156 0.47464572727272625 0.7977639000000014 1.2037601545454546 1.5225200999999977 1.7882055545454527 2.024811236363634 2.256461418181816 2.7078580227272706 3.3284555954545443 4.016352159090907 4.587657986363634 4.972522395454543 5.264216395454545 5.512329618181816 5.8869764545454535 6.372828168181817 6.94589004090909 7.571161649999999 8.023941072727272 8.39270449090909 8.77935388181818 8.805197545454547 8.601612395454545 8.292523681818182 7.930243750000001 7.646413318181818 7.526211804545455 7.564564154090908 7.746881157727273 7.834589710454546 7.754542366818181 7.49324825090909 7.207938067272727 7.178323675454545 7.217737861818183 7.161903220909092 7.1852990436363635 7.206258208636364 7.038393730000001 6.763687682727273 6.502847790000001 6.291055629545454 6.077600841363637 5.790635207727273 5.443607505909091 5.103184435909092 4.86922702 4.617471335454545 4.3047238850000005 4.031671995909091 3.8282986531818186 3.6257627568181823 3.385370432272728 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 2.0 1.8351631188311681 1.8344353740259738 1.8088506428571423 1.7847644344155826 1.7829720396103879 1.7923390038961013 1.7139384863636344 1.6436818051948028 1.6240780240259713 1.60447424285714 1.4623914616883082 1.320308680519477 1.1642865493506456 1.0082644181818141 0.8563518870129894 0.7044393558441584 0.5246033246753274 0.3447672935064956 0.16403271233766414 -0.01670186883116731 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
|
@ -1,3 +1 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b1ea84701b4c5daa9e37293b3a8c84aff9357a425969c5d1720f13ab4ec7606
|
||||
size 1308
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
@ -1,3 +1 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eaa82206c1a952bdfd10ba322149514d2a3aaf7db7a08d0f89d96fa282bfdc43
|
||||
size 900
|
||||
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
@ -1,3 +1 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cd7a7e42abc9ec28c5cfe91964e8cb6d7807a947463cd708edf835386b6f5c2c
|
||||
size 4809
|
||||
-16.0 -16.0 -16.0 -16.0 -16.0 -16.0 -16.0 -16.0 -16.0 -16.0030005 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -16.006001 -15.943623500000001 -15.881246 -15.816197500000001 -15.751149 -15.773361 -15.795573 -15.8146685 -15.833764 -15.778788 -15.723812 -15.689659 -15.655506 -15.6387295 -15.621953 -15.661657 -15.701361 -15.7411355 -15.78091 -15.755651499999999 -15.730393 -15.688119 -15.645845 -15.631902499999999 -15.61796 -15.589325500000001 -15.560691 -15.5670085 -15.573326 -15.486844 -15.400362 -15.214036 -15.02771 -14.9567825 -14.885855 -14.882393 -14.878931 -14.9088545 -14.938778 -14.8344285 -14.730079 -14.7571455 -14.784212 -14.7689165 -14.753621 -14.7533025 -14.752984 -14.706036000000001 -14.659088 -14.7279955 -14.796903 -14.814821 -14.832739 -14.8244145 -14.81609 -14.7981595 -14.780229 -14.771710500000001 -14.763192 -14.7391665 -14.715141 -14.759877 -14.804613 -14.762627 -14.720641 -14.789644500000001 -14.858648 -14.862199 -14.86575 -14.799389999999999 -14.73303 -14.760145999999999 -14.787262 -14.737239500000001 -14.687217 -14.715263 -14.743309 -14.737463 -14.731617 -14.7335975 -14.735578 -14.7440185 -14.752459 -14.800866 -14.849273 -14.8300105 -14.810748 -14.7690775 -14.727407 -14.699237 -14.671067 -14.697172 -14.723277 -14.7142905 -14.705304 -14.6880615 -14.670819 -14.727667 -14.784515 -14.708768 -14.633021 -14.675764999999998 -14.718509 -14.597324 -14.476139 -14.459793999999999 -14.443449 -14.4187075 -14.393966 -14.3316695 -14.002316272727272 -13.855776363636364 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.73685518181818 -13.480393763636364 -13.02899715909091 -12.408399586363636 -11.720503022727273 -11.149197195454546 -10.764332786363637 -10.472638786363635 -10.224525563636364 -9.849878727272728 -9.364027013636363 -8.79096514090909 -8.165693531818182 -7.712914109090909 -7.344150690909092 -6.9575013000000006 -6.675196218181818 -6.427384763636364 -6.115875904545455 -5.790259272727273 -5.502783877272728 -5.238120981818182 -4.9080746322727276 -4.477644405909091 -4.015289016818182 -3.6094846468181823 -3.2977168900000002 -2.9577554645454542 -2.534590433636364 -2.126412829090909 -1.795598079090909 -1.4898971745454546 -1.2211265550000001 0.18171014090909088 0.225112168181818 0.2626339090909089 0.3160848454545455 0.3755115090909089 0.44294754090909105 0.5119367499999998 0.579982840909091 0.6242613363636367 0.6613643272727274 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.7182761454545452 0.8831130266233771 1.0479499077922085 1.21278678896104 1.3776236701298714 1.5424605512987029 1.7072974324675343 1.8721343136363657 2.036971194805197 2.2018080759740286 2.36664495714286 2.5314818383116915 2.696318719480523 2.8611556006493544 3.025992481818186 3.19082936298701 3.3556662441558416 3.520503125324673 3.6853400064935045 3.850176887662336 4.015013768831167 4.1798506500000006 4.3613894 5.0562667 5.751144 7.12597825 8.5008125 8.95175665 9.4027008 9.39748715 9.3922735 9.389079899999999 9.3858863 9.3923233 9.3987603 9.394938549999999 9.3911168 9.3864873 9.3818578 9.364699 9.3475402 9.3475402
|
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,60 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ab57e0a813e6ea3086045717e251b2c44e00891a858d9f6365e3e604fefee03
|
||||
size 1316
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
import matplotlib.animation as animation
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
parser = argparse.ArgumentParser(description="Animate swash output")
|
||||
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("post")
|
||||
|
||||
log.info("Starting post-processing")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
inp = pathlib.Path(config.get("post", "inp"))
|
||||
root = pathlib.Path(config.get("swash", "out"))
|
||||
|
||||
bathy = pd.read_hdf(
|
||||
pathlib.Path(config.get("data", "out")).joinpath("bathy.h5"), "bathy"
|
||||
)
|
||||
|
||||
|
||||
def data(var):
|
||||
return np.load(inp.joinpath(f"{var}.npy"))
|
||||
|
||||
|
||||
x = data("xp")
|
||||
t = data("tsec")
|
||||
|
||||
watl = data("watl")
|
||||
botl = data("botl")
|
||||
|
||||
wl = np.maximum(watl, -botl)
|
||||
# print(x.size, -np.arange(0, 1 * bathy.hstru.size, 1)[::-1].size)
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(x, -botl, c="k")
|
||||
# ax.fill_between(
|
||||
# x, -botl, -data["botl"] + bathy.hstru, color="k", alpha=0.2
|
||||
# )
|
||||
(line,) = ax.plot(x, wl[0])
|
||||
|
||||
|
||||
def animate(i):
|
||||
line.set_ydata(wl[i])
|
||||
return (line,)
|
||||
|
||||
|
||||
ani = animation.FuncAnimation(
|
||||
fig, animate, frames=wl[:, 0].size, interval=20, blit=True
|
||||
)
|
||||
|
||||
plt.show(block=True)
|
||||
|
|
|
@ -1,3 +1,93 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:93e058c82e05d4d81cb1bb68459b978780f6c32fd0ba6c5d3662212542a0d118
|
||||
size 2877
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
plt = None
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description="Pre-process bathymetry")
|
||||
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("bathy")
|
||||
|
||||
log.info("Starting bathymetry pre-processing")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
root = pathlib.Path(config.get("data", "root"))
|
||||
|
||||
log.info(f"Reading input data from '{root}'")
|
||||
bathy_hires = np.loadtxt(root.joinpath(config.get("data", "hires")))
|
||||
bathy_lores = np.loadtxt(root.joinpath(config.get("data", "bathy")))
|
||||
hstru = np.loadtxt(root.joinpath(config.get("data", "hstru")))
|
||||
poro = np.loadtxt(root.joinpath(config.get("data", "poro")))
|
||||
psize = np.loadtxt(root.joinpath(config.get("data", "psize")))
|
||||
|
||||
log.info("Generating grid")
|
||||
x_hires = -np.arange(0, 0.5 * bathy_hires.size, 0.5)[::-1]
|
||||
x_lores = -np.arange(0, 1 * bathy_lores.size, 1)[::-1]
|
||||
x_hstru = -np.arange(0, 0.5 * hstru.size, 0.5)[::-1]
|
||||
|
||||
log.info("Generating output data")
|
||||
bathy_hires_pd = pd.Series(bathy_hires.copy(), index=x_hires)
|
||||
bathy_lores_pd = pd.Series(bathy_lores.copy(), index=x_lores)
|
||||
|
||||
bathy = pd.DataFrame(
|
||||
index=bathy_lores_pd.index.union(bathy_hires_pd.index),
|
||||
columns=("z", "hstru", "poro", "psize"),
|
||||
data=0,
|
||||
)
|
||||
bathy.z[bathy_lores_pd.index] = bathy_lores_pd
|
||||
bathy.z[bathy_hires_pd.index] = bathy_hires_pd
|
||||
|
||||
bathy.loc[x_hstru, ("hstru", "poro", "psize")] = np.array(
|
||||
(hstru, poro, psize)
|
||||
).T
|
||||
|
||||
bathy = bathy.reindex(bathy_lores_pd.index)
|
||||
log.debug(f"Bathymetry:\n{bathy}")
|
||||
log.info(
|
||||
f"xmin: {bathy.index.min()}, "
|
||||
f"xmax: {bathy.index.max()}, "
|
||||
f"n: {bathy.index.size}"
|
||||
)
|
||||
|
||||
if config.has_option("data", "out"):
|
||||
out = pathlib.Path(config.get("data", "out"))
|
||||
log.info(f"Writing output data to '{out}'")
|
||||
out.mkdir(exist_ok=True)
|
||||
np.savetxt(out.joinpath("bathy.dat"), bathy.z, newline=" ")
|
||||
np.savetxt(out.joinpath("hstru.dat"), bathy.hstru, newline=" ")
|
||||
np.savetxt(out.joinpath("poro.dat"), bathy.poro, newline=" ")
|
||||
np.savetxt(out.joinpath("psize.dat"), bathy.psize, newline=" ")
|
||||
|
||||
bathy.to_hdf(out.joinpath("bathy.h5"), "bathy", mode="w")
|
||||
|
||||
if config.getboolean("proc", "plot", fallback=False):
|
||||
if plt is None:
|
||||
log.error("Could not import PyPlot")
|
||||
sys.exit(1)
|
||||
|
||||
log.info("Plotting data")
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(x_hires, bathy_hires, label="High-res")
|
||||
ax.plot(x_lores, bathy_lores, label="Low-res")
|
||||
ax.plot(bathy.index, bathy.z, ls="-.", c="k", label="Combined")
|
||||
ax.plot(bathy.index, bathy.z + bathy.hstru, label="Hstru")
|
||||
|
||||
ax.grid()
|
||||
ax.legend()
|
||||
plt.show(block=True)
|
||||
|
||||
log.info("Processing finished")
|
||||
|
|
|
@ -1,3 +1,94 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8e3a75a559d7bf52e3e1703c5e45c8e473cd813aa99a95169bd9a500285f5a2d
|
||||
size 2923
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
plt = None
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser(description="Pre-process bathymetry")
|
||||
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("bathy")
|
||||
|
||||
log.info("Starting bathymetry pre-processing")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
root = pathlib.Path(config.get("data", "root"))
|
||||
|
||||
log.info(f"Reading input data from '{root}'")
|
||||
bathy_hires = np.loadtxt(root.joinpath(config.get("data", "hires")))
|
||||
bathy_lores = np.loadtxt(root.joinpath(config.get("data", "bathy")))
|
||||
hstru = np.loadtxt(root.joinpath(config.get("data", "hstru")))
|
||||
poro = np.loadtxt(root.joinpath(config.get("data", "poro")))
|
||||
psize = np.loadtxt(root.joinpath(config.get("data", "psize")))
|
||||
|
||||
log.info("Generating grid")
|
||||
x_hires = -np.arange(0, 0.5 * bathy_hires.size, 0.5)[::-1]
|
||||
x_lores = -np.arange(0, 1 * bathy_lores.size, 1)[::-1]
|
||||
x_hstru = -np.arange(0, 0.5 * hstru.size, 0.5)[::-1]
|
||||
|
||||
log.info("Generating output data")
|
||||
bathy_hires_pd = pd.Series(bathy_hires.copy(), index=x_hires)
|
||||
bathy_lores_pd = pd.Series(bathy_lores.copy(), index=x_lores)
|
||||
|
||||
bathy = pd.DataFrame(
|
||||
index=bathy_lores_pd.index.union(bathy_hires_pd.index),
|
||||
columns=("z", "hstru", "poro", "psize"),
|
||||
data=0,
|
||||
)
|
||||
bathy.z[bathy_lores_pd.index] = bathy_lores_pd
|
||||
bathy.z[bathy_hires_pd.index] = bathy_hires_pd
|
||||
bathy.z = np.minimum(bathy.z, -15)
|
||||
|
||||
# bathy.loc[x_hstru, ("hstru", "poro", "psize")] = np.array(
|
||||
# (hstru, poro, psize)
|
||||
# ).T
|
||||
|
||||
bathy = bathy.reindex(bathy_lores_pd.index)
|
||||
log.debug(f"Bathymetry:\n{bathy}")
|
||||
log.info(
|
||||
f"xmin: {bathy.index.min()}, "
|
||||
f"xmax: {bathy.index.max()}, "
|
||||
f"n: {bathy.index.size}"
|
||||
)
|
||||
|
||||
if config.has_option("data", "out_nb"):
|
||||
out = pathlib.Path(config.get("data", "out_nb"))
|
||||
log.info(f"Writing output data to '{out}'")
|
||||
out.mkdir(exist_ok=True)
|
||||
np.savetxt(out.joinpath("bathy.dat"), bathy.z, newline=" ")
|
||||
np.savetxt(out.joinpath("hstru.dat"), bathy.hstru, newline=" ")
|
||||
np.savetxt(out.joinpath("poro.dat"), bathy.poro, newline=" ")
|
||||
np.savetxt(out.joinpath("psize.dat"), bathy.psize, newline=" ")
|
||||
|
||||
bathy.to_hdf(out.joinpath("bathy.h5"), "bathy", mode="w")
|
||||
|
||||
if config.getboolean("proc", "plot", fallback=False):
|
||||
if plt is None:
|
||||
log.error("Could not import PyPlot")
|
||||
sys.exit(1)
|
||||
|
||||
log.info("Plotting data")
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
ax.plot(x_hires, bathy_hires, label="High-res")
|
||||
ax.plot(x_lores, bathy_lores, label="Low-res")
|
||||
ax.plot(bathy.index, bathy.z, ls="-.", c="k", label="Combined")
|
||||
ax.plot(bathy.index, bathy.z + bathy.hstru, label="Hstru")
|
||||
|
||||
ax.grid()
|
||||
ax.legend()
|
||||
plt.show(block=True)
|
||||
|
||||
log.info("Processing finished")
|
||||
|
|
|
@ -1,3 +1,92 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60aeefb03fe5f6ec669d64cd781e7254d7aeace3a2faab75098a4734343385a0
|
||||
size 1992
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
import matplotlib.animation as animation
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
parser = argparse.ArgumentParser(description="Animate swash output")
|
||||
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("post")
|
||||
|
||||
log.info("Starting post-processing")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
inp = pathlib.Path(config.get("post", "inp"))
|
||||
root = pathlib.Path(config.get("swash", "out"))
|
||||
|
||||
bathy = pd.read_hdf(
|
||||
pathlib.Path(config.get("data", "out")).joinpath("bathy.h5"), "bathy"
|
||||
)
|
||||
|
||||
|
||||
def data(var):
|
||||
return np.load(inp.joinpath(f"{var}.npy"))
|
||||
|
||||
|
||||
x = data("xp")
|
||||
t = data("tsec")
|
||||
|
||||
watl = data("watl")
|
||||
botl = data("botl")
|
||||
zk = data("zk")
|
||||
velk = data("velk")
|
||||
vz = data("vz")
|
||||
|
||||
wl = np.maximum(watl, -botl)
|
||||
# print(x.size, -np.arange(0, 1 * bathy.hstru.size, 1)[::-1].size)
|
||||
|
||||
fig, ax = plt.subplots()
|
||||
# ax.plot(x, -botl, c="k")
|
||||
# ax.fill_between(
|
||||
# x, -botl, -data["botl"] + bathy.hstru, color="k", alpha=0.2
|
||||
# )
|
||||
|
||||
n = 0
|
||||
vk = np.sqrt((velk[n] ** 2).sum(axis=1))
|
||||
# print(vk.shape)
|
||||
# plt.imshow(vk)
|
||||
# plt.colorbar()
|
||||
|
||||
lines = ax.plot(x, zk[n].T, c="#0066cc")
|
||||
quiv = []
|
||||
for i in range(10):
|
||||
quiv.append(
|
||||
ax.quiver(
|
||||
x[::50],
|
||||
(zk[n, i, ::50] + zk[n, i + 1, ::50]) / 2,
|
||||
velk[n, i, 0, ::50],
|
||||
vz[n, i, ::50],
|
||||
units="dots",
|
||||
width=2,
|
||||
scale=0.05,
|
||||
)
|
||||
)
|
||||
|
||||
ax.autoscale(True, "w", True)
|
||||
ax.set_ylim(top=15)
|
||||
|
||||
|
||||
def animate(k):
|
||||
for i, q in enumerate(quiv):
|
||||
q.set_UVC(
|
||||
velk[k, i, 0, ::50],
|
||||
vz[k, i, ::50],
|
||||
)
|
||||
for i, l in enumerate(lines):
|
||||
l.set_ydata(zk[k, i])
|
||||
return *quiv, *lines
|
||||
|
||||
|
||||
ani = animation.FuncAnimation(
|
||||
fig, animate, frames=wl[:, 0].size, interval=20, blit=True
|
||||
)
|
||||
|
||||
plt.show(block=True)
|
||||
|
|
|
@ -1,3 +1,169 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8fefac1023d769a2a43c86f159cf33155f5462aed2dcd4ac968d782f79760d4
|
||||
size 4665
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import scipy.fft as fft
|
||||
import scipy.signal as sgl
|
||||
|
||||
from .read_swash import *
|
||||
|
||||
parser = argparse.ArgumentParser(description="Post-process swash output")
|
||||
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("post")
|
||||
|
||||
log.info("Starting post-processing")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
inp = pathlib.Path(config.get("post", "inp"))
|
||||
root = pathlib.Path(config.get("swash", "out"))
|
||||
|
||||
log.info(f"Reading data from '{inp}'")
|
||||
x = np.load(inp.joinpath("xp.npy"))
|
||||
t = np.load(inp.joinpath("tsec.npy"))
|
||||
|
||||
botl = np.load(inp.joinpath("botl.npy"))
|
||||
watl = np.load(inp.joinpath("watl.npy"))
|
||||
vel = np.load(inp.joinpath("vel.npy"))
|
||||
|
||||
# Cospectral calculations
|
||||
x0 = config.getint("post", "x0")
|
||||
arg_x0 = np.abs(x - x0).argmin()
|
||||
t0 = config.getfloat("post", "t0")
|
||||
arg_t0 = np.abs(t - t0).argmin()
|
||||
dt = config.getfloat("post", "dt")
|
||||
f = 1 / dt
|
||||
nperseg = config.getint("post", "nperseg", fallback=None)
|
||||
log.info(f"Computing reflection coefficient at x={x0}")
|
||||
|
||||
eta = watl[t > t0, arg_x0]
|
||||
u = vel[t > t0, 0, arg_x0]
|
||||
|
||||
phi_eta = sgl.welch(eta, f, nperseg=nperseg)
|
||||
phi_u = sgl.welch(u, f, nperseg=nperseg)
|
||||
phi_eta_u = sgl.csd(eta, u, f, nperseg=nperseg)
|
||||
|
||||
H = np.sqrt(np.abs(phi_eta[1]))
|
||||
U = np.sqrt(np.abs(phi_u[1]))
|
||||
G = H / U
|
||||
th_eta_u = np.angle(phi_eta_u[1])
|
||||
|
||||
# R1 = np.sqrt(
|
||||
# (np.abs(phi_eta[1]) + np.abs(phi_u[1]) - 2 * np.abs(phi_eta_u[1]))
|
||||
# / (np.abs(phi_eta[1]) + np.abs(phi_u[1]) + 2 * np.abs(phi_eta_u[1]))
|
||||
# )
|
||||
R = np.sqrt(
|
||||
(1 + G**2 - 2 * G * np.cos(th_eta_u))
|
||||
/ (1 + G**2 + 2 * G * np.cos(th_eta_u))
|
||||
)
|
||||
|
||||
if config.has_option("post", "compare"):
|
||||
inp_comp = pathlib.Path(config.get("post", "compare"))
|
||||
x_ = np.load(inp_comp.joinpath("xp.npy"))
|
||||
t_ = np.load(inp_comp.joinpath("tsec.npy"))
|
||||
|
||||
botl_ = np.load(inp_comp.joinpath("botl.npy"))
|
||||
watl_ = np.load(inp_comp.joinpath("watl.npy"))
|
||||
vel_ = np.load(inp_comp.joinpath("vel.npy"))
|
||||
|
||||
arg_x0_ = np.abs(x_ - x0).argmin()
|
||||
arg_t0_ = np.abs(t_ - t0).argmin()
|
||||
|
||||
eta_ = watl_[t_ > t0, arg_x0_]
|
||||
u_ = vel_[t_ > t0, 0, arg_x0_]
|
||||
|
||||
phi_eta_ = sgl.welch(eta_, f, nperseg=nperseg)
|
||||
phi_u_ = sgl.welch(u_, f, nperseg=nperseg)
|
||||
phi_eta_u_ = sgl.csd(eta_, u_, f, nperseg=nperseg)
|
||||
|
||||
H_ = np.sqrt(np.abs(phi_eta_[1]))
|
||||
U_ = np.sqrt(np.abs(phi_u_[1]))
|
||||
G_ = H_ / U_
|
||||
th_eta_u_ = np.angle(phi_eta_u_[1])
|
||||
|
||||
R_ = np.sqrt(
|
||||
(1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))
|
||||
/ (1 + G_**2 + 2 * G_ * np.cos(th_eta_u_))
|
||||
)
|
||||
|
||||
|
||||
# Plotting
|
||||
log.info("Plotting results")
|
||||
fig, (ax_watl, ax_vel) = plt.subplots(2)
|
||||
|
||||
ax_watl.plot(t, watl[:, arg_x0], lw=1, label="watl")
|
||||
ax_watl.set(xlabel="t (s)", ylabel="z (m)")
|
||||
ax_watl.autoscale(axis="x", tight=True)
|
||||
ax_watl.grid()
|
||||
ax_watl.axvline(t0, c="k", alpha=0.2)
|
||||
|
||||
ax_vel.plot(t, vel[:, 0, arg_x0], lw=1, label="vel")
|
||||
ax_vel.set(xlabel="t (s)", ylabel="U (m/s)")
|
||||
ax_vel.autoscale(axis="x", tight=True)
|
||||
ax_vel.grid()
|
||||
ax_vel.axvline(t0, c="k", alpha=0.2)
|
||||
|
||||
fig.tight_layout()
|
||||
|
||||
fig_r, ax_r = plt.subplots()
|
||||
ax_fft = ax_r.twinx()
|
||||
|
||||
ax_fft.plot(
|
||||
*sgl.welch(eta, 1 / dt, nperseg=nperseg),
|
||||
lw=1,
|
||||
c="k",
|
||||
alpha=0.2,
|
||||
label="PSD ($\\eta$, cas 1)",
|
||||
)
|
||||
ax_r.plot(phi_eta[0], R, marker="+", label="R (cas 1)")
|
||||
if config.has_option("post", "compare"):
|
||||
ax_fft.plot(
|
||||
*sgl.welch(eta_, 1 / dt, nperseg=nperseg),
|
||||
lw=1,
|
||||
c="k",
|
||||
alpha=0.2,
|
||||
label="PSD ($\\eta$, cas 2)",
|
||||
)
|
||||
ax_r.plot(phi_eta[0], R_, marker="+", label="R (cas 2)")
|
||||
ax_r.set(xlim=(0, 0.3), ylim=(0, 1), xlabel="f (Hz)", ylabel="R")
|
||||
ax_fft.set(ylim=0, ylabel="PSD (m²/Hz)")
|
||||
ax_r.grid()
|
||||
ax_r.legend(loc="upper left")
|
||||
ax_fft.legend(loc="upper right")
|
||||
fig_r.tight_layout()
|
||||
|
||||
fig_x, ax_x = plt.subplots(figsize=(10, 1))
|
||||
ax_x.plot(x, -botl, color="k")
|
||||
ax_x.plot(
|
||||
x,
|
||||
np.maximum(watl[arg_t0, :], -botl),
|
||||
)
|
||||
if config.has_option("post", "compare"):
|
||||
ax_x.plot(x, -botl_, color="k", ls="-.")
|
||||
ax_x.plot(
|
||||
x,
|
||||
np.maximum(watl_[arg_t0, :], -botl_),
|
||||
ls="-.",
|
||||
)
|
||||
ax_x.axvline(x0, c="k", alpha=0.2)
|
||||
ax_x.set(xlabel="x (m)", ylabel="z (m)")
|
||||
ax_x.autoscale(axis="x", tight=True)
|
||||
ax_x.set(aspect="equal")
|
||||
fig_x.tight_layout()
|
||||
|
||||
out = pathlib.Path(config.get("post", "out")).joinpath(f"t{t0}x{x0}")
|
||||
log.info(f"Saving plots in '{out}'")
|
||||
out.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
fig.savefig(out.joinpath("t.png"))
|
||||
fig_r.savefig(out.joinpath("R.png"))
|
||||
fig_x.savefig(out.joinpath("x.png"))
|
||||
plt.show(block=True)
|
||||
|
||||
log.info("Finished post-processing")
|
||||
|
|
|
@ -1,3 +1,52 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:81ddc1baff1a727e68dc2819fe3f39ca657c488ab8cbeb83c2d260ae7c9c13fd
|
||||
size 1349
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
class ReadSwash:
|
||||
def __init__(self):
|
||||
self._n_x = None
|
||||
self._n_t = None
|
||||
self._t = None
|
||||
self._x = None
|
||||
|
||||
@classmethod
|
||||
def read_nohead(cls, path):
|
||||
subprocess.run(("sed", "-i", r"s/ /\n/g", path))
|
||||
return np.loadtxt(path)
|
||||
|
||||
def read_time(self, path):
|
||||
self._t = np.unique(self.read_nohead(path))
|
||||
self._n_t = self._t.size
|
||||
return self.t
|
||||
|
||||
def read_x(self, path):
|
||||
self._x = np.unique(self.read_nohead(path))
|
||||
self._n_x = self._x.size
|
||||
return self.x
|
||||
|
||||
def read_scalar(self, path, const=False):
|
||||
if const:
|
||||
return self.read_nohead(path).reshape((self._n_t, self._n_x))[0, :]
|
||||
return self.read_nohead(path).reshape((self._n_t, self._n_x))
|
||||
|
||||
def read_const(self, path):
|
||||
return self.read_scalar(path, const=True)
|
||||
|
||||
def read_vector(self, path):
|
||||
return self.read_nohead(path).reshape((self._n_t, 2, self._n_x))
|
||||
|
||||
def read_scalar_lay(self, path):
|
||||
return self.read_nohead(path).reshape((self._n_t, -1, self._n_x))
|
||||
|
||||
def read_vector_lay(self, path):
|
||||
return self.read_nohead(path).reshape((self._n_t, -1, 2, self._n_x))
|
||||
|
||||
@property
|
||||
def t(self):
|
||||
return self._t
|
||||
|
||||
@property
|
||||
def x(self):
|
||||
return self._x
|
||||
|
|
|
@ -1,3 +1,67 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b17bd29f45896e07ef9e48ab27c905158de21bdedc7b9ecbf1a7943e4af7ae70
|
||||
size 1962
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
parser = argparse.ArgumentParser(description="Run swash model")
|
||||
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("swash")
|
||||
|
||||
log.info("Starting swash model")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
inp = pathlib.Path(config.get("swash", "input"))
|
||||
out = pathlib.Path(config.get("swash", "out"))
|
||||
if out.exists():
|
||||
log.error(f"Swash output '{out}' already exists")
|
||||
sys.exit(1)
|
||||
|
||||
with tempfile.TemporaryDirectory(prefix="swash_", dir=".") as tmp_raw:
|
||||
tmpdir = pathlib.Path(tmp_raw)
|
||||
|
||||
log.info(f"Copying files to '{tmpdir}'")
|
||||
shutil.copy2(inp, tmpdir)
|
||||
if config.getboolean("swash", "nb", fallback=False):
|
||||
path = pathlib.Path(config.get("data", "out_nb"))
|
||||
else:
|
||||
path = pathlib.Path(config.get("data", "out"))
|
||||
shutil.copytree(path, tmpdir, dirs_exist_ok=True)
|
||||
|
||||
if config.has_option("swash", "mpi"):
|
||||
mpi = ("-mpi", config.get("swash", "mpi"))
|
||||
log.info(f"Using mpi with {mpi}")
|
||||
else:
|
||||
mpi = ()
|
||||
|
||||
with open(tmpdir.joinpath("sws.log"), "w") as logfile:
|
||||
log.info(f"Runing swash in '{tmpdir}'")
|
||||
path = pathlib.Path(config.get("swash", "path"))
|
||||
|
||||
cmd = (path.joinpath("swashrun"), "-input", inp.name, *mpi)
|
||||
log.info(f"Running {cmd}")
|
||||
|
||||
swash_run = subprocess.Popen(
|
||||
cmd,
|
||||
cwd=tmpdir,
|
||||
stdout=logfile,
|
||||
stderr=logfile,
|
||||
env={"PATH": f"{path}:{os.environ['PATH']}"},
|
||||
)
|
||||
|
||||
code = swash_run.wait()
|
||||
if code != 0:
|
||||
log.error(f"Swash returned error code {code}")
|
||||
|
||||
log.info(f"Moving swash output to '{out}'")
|
||||
shutil.move(tmpdir, out)
|
||||
|
||||
log.info(f"Swash model finished successfully")
|
||||
|
|
|
@ -1,3 +1,51 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f3b186f594089b65b3739d2f03855c691f45e0b2744e37196e07cdf60c896cfc
|
||||
size 1393
|
||||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
import pathlib
|
||||
from multiprocessing.pool import ThreadPool
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
from .read_swash import ReadSwash
|
||||
|
||||
parser = argparse.ArgumentParser(description="Convert swash output to numpy")
|
||||
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_npz")
|
||||
|
||||
log.info("Starting sws -> npz converter")
|
||||
config = configparser.ConfigParser()
|
||||
config.read("config.ini")
|
||||
|
||||
sws_out = pathlib.Path(config.get("swash", "out"))
|
||||
inp = pathlib.Path(config.get("post", "inp"))
|
||||
|
||||
log.info(f"Reading swash output from '{sws_out}'")
|
||||
rsws = ReadSwash()
|
||||
np.save(inp.joinpath("tsec"), rsws.read_time(sws_out.joinpath("tsec.dat")))
|
||||
np.save(inp.joinpath("xp"), rsws.read_x(sws_out.joinpath("xp.dat")))
|
||||
|
||||
var = {
|
||||
"dep": rsws.read_scalar,
|
||||
"botl": rsws.read_const,
|
||||
"watl": rsws.read_scalar,
|
||||
"vel": rsws.read_vector,
|
||||
"press": rsws.read_scalar,
|
||||
"zk": rsws.read_scalar_lay,
|
||||
"velk": rsws.read_vector_lay,
|
||||
"vz": rsws.read_scalar_lay,
|
||||
}
|
||||
|
||||
inp.mkdir(exist_ok=True)
|
||||
with ThreadPool() as pool:
|
||||
log.info("Converting all data")
|
||||
pool.map(
|
||||
lambda x: np.save(
|
||||
inp.joinpath(x[0]),
|
||||
x[1](sws_out.joinpath(x[0]).with_suffix(".dat")),
|
||||
),
|
||||
var.items(),
|
||||
)
|
||||
|
|
|
@ -1,3 +1,58 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f85c1b0ecdfa156bd0d04a7654abd412080df57aa4a24190bbaac57b0335a12
|
||||
size 2300
|
||||
$************************* GENERAL ***************************************
|
||||
PROJ 'GW' 'T1'
|
||||
SET NAUT
|
||||
SET LEVEL 0.94
|
||||
SET MAXERR 1
|
||||
SET DEPMIN 0.001
|
||||
MODE DYN ONED
|
||||
$************************ GRIDS ***************************************
|
||||
CGRID REG -1251 0 0 1251 0 1250 0
|
||||
INPGRID BOT REG -1251 0 0 1250 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy
|
||||
VERT 10 $nb couches
|
||||
READ BOTTOM -1 'bathy.dat' 3 0 FREE
|
||||
|
||||
INPGRID PORO REG -1251 0 0 1250 0 1 0
|
||||
INPGRID PSIZ REG -1251 0 0 1250 0 1 0
|
||||
INPGRID HSTRUC REG -1251 0 0 1250 0 1 0
|
||||
|
||||
READINP PORO 1 'poro.dat' 3 0 FREE
|
||||
READINP PSIZ 1 'psize.dat' 3 0 FREE
|
||||
READINP HSTRUC 1 'hstru.dat' 3 0 FREE
|
||||
|
||||
|
||||
$*********************** BOUNDARIES ****************************************
|
||||
INIT ZERO
|
||||
BOUN SHAP JON SIG PEAK DSPR DEGR
|
||||
BOUN SIDE W BTYPE WEAK SMOOT 10 SEC ADDBOUNDWAVE CON SPECT 1.55 13.3 0 0 CYCLE 20 MIN
|
||||
BOUN SIDE E BTYPE SOMMERFELD
|
||||
|
||||
|
||||
$*********************** PHYSICS *******************************************
|
||||
BRE 0.6 0.2
|
||||
FRICTION MANN 0.08
|
||||
POROsity 4 200 1.1 13
|
||||
VISC V KEPS
|
||||
|
||||
$*********************** NUMERICS ******************************************
|
||||
NONHYD BOX 1.0 PREC ILU
|
||||
DISCRET UPW MOM
|
||||
TIMEI 0.2 0.6
|
||||
|
||||
$*********************** OUTPUTS *******************************************
|
||||
SET OUTLEV 1
|
||||
$BLOCK 'COMPGRID' HEAD 'test.txt' LAY 4 TSEC XP DEP BOTL WATL PRESS DISCH USTAR VEL VZ VELK ZK BRKP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'tsec.dat' TSEC OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'xp.dat' XP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'dep.dat' DEP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'botl.dat' BOTL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'watl.dat' WATL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'press.dat' PRESS OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'disch.dat' DISCH OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'ustar.dat' USTAR OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vel.dat' VEL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vz.dat' VZ OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'velk.dat' VELK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'zk.dat' ZK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'brkp.dat' BRKP OUTPUT 000000.00 0.25 SEC
|
||||
COMPUTE 000000.000 0.015 SEC 003000.000 $timeini dtini unit timefin
|
||||
STOP
|
||||
|
|
|
@ -1,3 +1,58 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce3044df5425b1858aada8e6a1aab3f081f0b48151902c66a3c02f0463f13d98
|
||||
size 2299
|
||||
$************************* GENERAL ***************************************
|
||||
PROJ 'GW' 'T1'
|
||||
SET NAUT
|
||||
SET LEVEL 4.5
|
||||
SET MAXERR 1
|
||||
SET DEPMIN 0.001
|
||||
MODE DYN ONED
|
||||
$************************ GRIDS ***************************************
|
||||
CGRID REG -1250 0 0 1250 0 1250 0
|
||||
INPGRID BOT REG -1250 0 0 1250 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy
|
||||
VERT 10 $nb couches
|
||||
READ BOTTOM -1 'bathy.dat' 3 0 FREE
|
||||
|
||||
INPGRID PORO REG -1251 0 0 1250 0 1 0
|
||||
INPGRID PSIZ REG -1251 0 0 1250 0 1 0
|
||||
INPGRID HSTRUC REG -1251 0 0 1250 0 1 0
|
||||
|
||||
READINP PORO 1 'poro.dat' 3 0 FREE
|
||||
READINP PSIZ 1 'psize.dat' 3 0 FREE
|
||||
READINP HSTRUC 1 'hstru.dat' 3 0 FREE
|
||||
|
||||
|
||||
$*********************** BOUNDARIES ****************************************
|
||||
INIT ZERO
|
||||
BOUN SHAP JON SIG PEAK DSPR DEGR
|
||||
BOUN SIDE W BTYPE WEAK SMOOT 10 SEC ADDBOUNDWAVE CON SPECT 7.31 16.9 0 0 CYCLE 20 MIN
|
||||
BOUN SIDE E BTYPE SOMMERFELD
|
||||
|
||||
|
||||
$*********************** PHYSICS *******************************************
|
||||
BRE 0.6 0.2
|
||||
FRICTION MANN 0.08
|
||||
POROsity 4 200 1.1 13
|
||||
VISC V KEPS
|
||||
|
||||
$*********************** NUMERICS ******************************************
|
||||
NONHYD BOX 1.0 PREC ILU
|
||||
DISCRET UPW MOM
|
||||
TIMEI 0.2 0.6
|
||||
|
||||
$*********************** OUTPUTS *******************************************
|
||||
SET OUTLEV 1
|
||||
$BLOCK 'COMPGRID' HEAD 'test.txt' LAY 4 TSEC XP DEP BOTL WATL PRESS DISCH USTAR VEL VZ VELK ZK BRKP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'tsec.dat' TSEC OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'xp.dat' XP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'dep.dat' DEP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'botl.dat' BOTL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'watl.dat' WATL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'press.dat' PRESS OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'disch.dat' DISCH OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'ustar.dat' USTAR OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vel.dat' VEL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vz.dat' VZ OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'velk.dat' VELK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'zk.dat' ZK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'brkp.dat' BRKP OUTPUT 000000.00 0.25 SEC
|
||||
COMPUTE 000000.000 0.015 SEC 002500.000 $timeini dtini unit timefin
|
||||
STOP
|
||||
|
|
|
@ -1,3 +1,59 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e307c866ed9c49575428171b676dfb21a1af867f99dab1c99aa095ab9520d5e2
|
||||
size 2310
|
||||
$************************* GENERAL ***************************************
|
||||
PROJ 'GW' 'T1'
|
||||
SET NAUT
|
||||
SET LEVEL 4.5
|
||||
SET MAXERR 1
|
||||
SET DEPMIN 0.001
|
||||
MODE DYN ONED
|
||||
$************************ GRIDS ***************************************
|
||||
CGRID REG -1250 0 0 1250 0 1250 0
|
||||
INPGRID BOT REG -1250 0 0 1250 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy
|
||||
VERT 10 $nb couches
|
||||
READ BOTTOM -1 'bathy.dat' 3 0 FREE
|
||||
|
||||
INPGRID PORO REG -1251 0 0 1250 0 1 0
|
||||
INPGRID PSIZ REG -1251 0 0 1250 0 1 0
|
||||
INPGRID HSTRUC REG -1251 0 0 1250 0 1 0
|
||||
|
||||
READINP PORO 1 'poro.dat' 3 0 FREE
|
||||
READINP PSIZ 1 'psize.dat' 3 0 FREE
|
||||
READINP HSTRUC 1 'hstru.dat' 3 0 FREE
|
||||
|
||||
|
||||
$*********************** BOUNDARIES ****************************************
|
||||
INIT ZERO
|
||||
BOUN SHAP JON SIG PEAK DSPR DEGR
|
||||
BOUN SIDE W BTYPE WEAK SMOOT 10 SEC ADDBOUNDWAVE CON SPECT 7.31 16.9 0 0 CYCLE 20 MIN
|
||||
BOUN SIDE E BTYPE SOMMERFELD
|
||||
SPON E 250
|
||||
|
||||
|
||||
$*********************** PHYSICS *******************************************
|
||||
BRE 0.6 0.2
|
||||
FRICTION MANN 0.08
|
||||
POROsity 4 200 1.1 13
|
||||
VISC V KEPS
|
||||
|
||||
$*********************** NUMERICS ******************************************
|
||||
NONHYD BOX 1.0 PREC ILU
|
||||
DISCRET UPW MOM
|
||||
TIMEI 0.2 0.6
|
||||
|
||||
$*********************** OUTPUTS *******************************************
|
||||
SET OUTLEV 1
|
||||
$BLOCK 'COMPGRID' HEAD 'test.txt' LAY 4 TSEC XP DEP BOTL WATL PRESS DISCH USTAR VEL VZ VELK ZK BRKP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'tsec.dat' TSEC OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'xp.dat' XP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'dep.dat' DEP OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'botl.dat' BOTL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'watl.dat' WATL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'press.dat' PRESS OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'disch.dat' DISCH OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'ustar.dat' USTAR OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vel.dat' VEL OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'vz.dat' VZ OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'velk.dat' VELK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'zk.dat' ZK OUTPUT 000000.00 0.25 SEC
|
||||
BLOCK 'COMPGRID' NOHEAD 'brkp.dat' BRKP OUTPUT 000000.00 0.25 SEC
|
||||
COMPUTE 000000.000 0.015 SEC 002500.000 $timeini dtini unit timefin
|
||||
STOP
|
||||
|
|
Reference in a new issue