1
Fork 0

Merge branch 'test-overtopping' into swash

This commit is contained in:
Edgar P. Burkhart 2022-03-30 11:08:38 +02:00
commit 0ab50eeca8
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
5 changed files with 22 additions and 21 deletions

View file

@ -133,4 +133,5 @@ np.savetxt(out_root.joinpath("psize.dat"), psize[::-1], newline=" ")
fig, ax = plt.subplots() fig, ax = plt.subplots()
ax.plot(-x, z, color="k") ax.plot(-x, z, color="k")
ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2) ax.fill_between(-x, z + hstru, z, color="k", alpha=0.2)
ax.set_title(f"N={z.size-1}, x=[{-x.max()};{-x.min()}]")
fig.savefig(out_root.joinpath("bathy.pdf")) fig.savefig(out_root.joinpath("bathy.pdf"))

View file

@ -4,13 +4,12 @@ out=../data/out
[swash] [swash]
input=sws/SPEC_buoy.sws input=sws/SPEC_buoy.sws
path=/data/code/swash path=/data/code/swash
out=out/spec out=out/spec_ot_2lay
mpi=8 mpi=8
[post] [post]
inp=inp_post/spec inp=inp_post/spec_ot_2lay
compare=inp_post_nb compare=inp_post/spec_ot_2lay
out=out_post out=out_post/spec_ot_2lay
#nperseg=1024
x0=-1250 x0=-1250
t0=180 t0=180

View file

@ -88,14 +88,14 @@ if config.has_option("post", "compare"):
G_ = H_ / U_ G_ = H_ / U_
th_eta_u_ = np.angle(phi_eta_u_[1]) th_eta_u_ = np.angle(phi_eta_u_[1])
#R_ = 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( R_ = np.sqrt(
(np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) - 2 * np.abs(phi_eta_u_[1])) (1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))
/ (np.abs(phi_eta_[1]) + np.abs(phi_u_[1]) + 2 * np.abs(phi_eta_u_[1])) / (1 + G_**2 + 2 * G_ * np.cos(th_eta_u_))
) )
# R_ = np.sqrt(
# (1 + G_**2 - 2 * G_ * np.cos(th_eta_u_))
# / (1 + G_**2 + 2 * G_ * np.cos(th_eta_u_))
# )
# Plotting # Plotting

View file

@ -30,14 +30,15 @@ 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"))) np.save(inp.joinpath("xp"), rsws.read_x(sws_out.joinpath("xp.dat")))
var = { var = {
"dep": rsws.read_scalar, #"dep": rsws.read_scalar,
"botl": rsws.read_const, #"botl": rsws.read_const,
"watl": rsws.read_scalar, #"watl": rsws.read_scalar,
"pressk": rsws.read_scalar_lay, #"pressk": rsws.read_scalar_lay,
"nhprsk": rsws.read_scalar_lay, #"nhprsk": rsws.read_scalar_lay,
"zk": rsws.read_scalar_lay, "zk": rsws.read_scalar_lay,
"velk": rsws.read_vector_lay, #"velk": rsws.read_vector_lay,
"vz": rsws.read_scalar_lay, #"vz": rsws.read_scalar_lay,
#"vel": rsws.read_vector,
} }
with ThreadPool(len(var)) as pool: with ThreadPool(len(var)) as pool:

View file

@ -1,13 +1,13 @@
$************************* GENERAL *************************************** $************************* GENERAL ***************************************
PROJ 'GW' 'T1' PROJ 'GW' 'T1'
SET NAUT SET NAUT
SET LEVEL 0.5 SET LEVEL 4.5
SET MAXERR 1 SET MAXERR 1
SET DEPMIN 0.001 SET DEPMIN 0.001
MODE DYN ONED MODE DYN ONED
$************************ GRIDS *************************************** $************************ GRIDS ***************************************
CGRID REG -1450 0 0 1450 0 1450 0 CGRID REG -1450 0 0 1600 0 1600 0
INPGRID BOT REG -1450 0 0 1450 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy INPGRID BOT REG -1450 0 0 1600 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy
VERT 10 $nb couches VERT 10 $nb couches
READ BOTTOM -1 'bathy.dat' 3 0 FREE READ BOTTOM -1 'bathy.dat' 3 0 FREE