diff --git a/swash/processing/sws_npz.py b/swash/processing/sws_npz.py index b8c7e1e..c79d4c5 100644 --- a/swash/processing/sws_npz.py +++ b/swash/processing/sws_npz.py @@ -32,6 +32,12 @@ botl = read_nohead_scalar(sws_out.joinpath("botl.dat"), n_x)[0, :] 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) +dt = config.getfloat("post", "dt") +n_t = botl.shape[0] +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"), botl=botl, dep=dep, vel=vel) +np.savez_compressed( + inp.joinpath("sws"), x=bathy.index, t=t, botl=botl, dep=dep, vel=vel +)