1
Fork 0

Fixed t in sws_npz

This commit is contained in:
Edgar P. Burkhart 2022-03-03 16:08:50 +01:00
parent bec1cd2a89
commit b73f81c4ea
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -28,7 +28,7 @@ bathy = pd.read_hdf(data_out.joinpath("bathy.h5"), "bathy")
n_x = bathy.index.size
log.info(f"Reading swash output from '{sws_out}'")
botl = read_nohead_scalar(sws_out.joinpath("botl.dat"), n_x)[0, :]
botl = read_nohead_scalar(sws_out.joinpath("botl.dat"), n_x)
dep = np.maximum(0, read_nohead_scalar(sws_out.joinpath("dep.dat"), n_x))
vel = read_nohead_vect(sws_out.joinpath("vel.dat"), n_x)
@ -39,5 +39,5 @@ t = np.arange(0, n_t * dt, dt)
log.info(f"Writing npz file in '{inp}'")
inp.mkdir(exist_ok=True)
np.savez_compressed(
inp.joinpath("sws"), x=bathy.index, t=t, botl=botl, dep=dep, vel=vel
inp.joinpath("sws"), x=bathy.index, t=t, botl=botl[0, :], dep=dep, vel=vel
)