1
Fork 0

Added x,t to npz

This commit is contained in:
Edgar P. Burkhart 2022-03-03 15:55:48 +01:00
parent a6c7343fbd
commit 8899ad8b36
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
1 changed files with 7 additions and 1 deletions

View File

@ -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
)