Optimized npz
This commit is contained in:
parent
805b4219c5
commit
a6c7343fbd
1 changed files with 2 additions and 1 deletions
|
@ -28,9 +28,10 @@ bathy = pd.read_hdf(data_out.joinpath("bathy.h5"), "bathy")
|
||||||
n_x = bathy.index.size
|
n_x = bathy.index.size
|
||||||
|
|
||||||
log.info(f"Reading swash output from '{sws_out}'")
|
log.info(f"Reading swash output from '{sws_out}'")
|
||||||
botl = read_nohead_scalar(sws_out.joinpath("botl.dat"), n_x)
|
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))
|
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)
|
vel = read_nohead_vect(sws_out.joinpath("vel.dat"), n_x)
|
||||||
|
|
||||||
|
log.info(f"Writing npz file in '{inp}'")
|
||||||
inp.mkdir(exist_ok=True)
|
inp.mkdir(exist_ok=True)
|
||||||
np.savez_compressed(inp.joinpath("sws"), botl=botl, dep=dep, vel=vel)
|
np.savez_compressed(inp.joinpath("sws"), botl=botl, dep=dep, vel=vel)
|
||||||
|
|
Loading…
Reference in a new issue