Added x,t to npz
This commit is contained in:
parent
a6c7343fbd
commit
8899ad8b36
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue