diff --git a/data/processing/projection.py b/data/processing/projection.py index 7112d32..8e4f3ca 100644 --- a/data/processing/projection.py +++ b/data/processing/projection.py @@ -133,4 +133,5 @@ np.savetxt(out_root.joinpath("psize.dat"), psize[::-1], newline=" ") fig, ax = plt.subplots() ax.plot(-x, z, color="k") 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")) diff --git a/swash/config.ini b/swash/config.ini index 43f34d8..dfe967d 100644 --- a/swash/config.ini +++ b/swash/config.ini @@ -4,13 +4,12 @@ out=../data/out [swash] input=sws/SPEC_buoy.sws path=/data/code/swash -out=out/spec +out=out/spec_ot_2lay mpi=8 [post] -inp=inp_post/spec -compare=inp_post_nb -out=out_post -#nperseg=1024 +inp=inp_post/spec_ot_2lay +compare=inp_post/spec_ot_2lay +out=out_post/spec_ot_2lay x0=-1250 t0=180 diff --git a/swash/processing/post.py b/swash/processing/post.py index 0d1a0c1..8710133 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -88,14 +88,14 @@ if config.has_option("post", "compare"): G_ = H_ / U_ 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( - (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])) + (1 + G_**2 - 2 * G_ * np.cos(th_eta_u_)) + / (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 diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index 54eba2b..854b599 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -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"))) var = { - "dep": rsws.read_scalar, - "botl": rsws.read_const, - "watl": rsws.read_scalar, - "pressk": rsws.read_scalar_lay, - "nhprsk": rsws.read_scalar_lay, + #"dep": rsws.read_scalar, + #"botl": rsws.read_const, + #"watl": rsws.read_scalar, + #"pressk": rsws.read_scalar_lay, + #"nhprsk": rsws.read_scalar_lay, "zk": rsws.read_scalar_lay, - "velk": rsws.read_vector_lay, - "vz": rsws.read_scalar_lay, + #"velk": rsws.read_vector_lay, + #"vz": rsws.read_scalar_lay, + #"vel": rsws.read_vector, } with ThreadPool(len(var)) as pool: diff --git a/swash/sws/SPEC_buoy.sws b/swash/sws/SPEC_buoy.sws index 0d0db11..a127ccb 100644 --- a/swash/sws/SPEC_buoy.sws +++ b/swash/sws/SPEC_buoy.sws @@ -1,13 +1,13 @@ $************************* GENERAL *************************************** PROJ 'GW' 'T1' SET NAUT -SET LEVEL 0.5 +SET LEVEL 4.5 SET MAXERR 1 SET DEPMIN 0.001 MODE DYN ONED $************************ GRIDS *************************************** -CGRID REG -1450 0 0 1450 0 1450 0 -INPGRID BOT REG -1450 0 0 1450 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy +CGRID REG -1450 0 0 1600 0 1600 0 +INPGRID BOT REG -1450 0 0 1600 0 1 0 $x0 y0 theta nx-1 ny-1 dx dy VERT 10 $nb couches READ BOTTOM -1 'bathy.dat' 3 0 FREE