1
Fork 0

Optimized npz

This commit is contained in:
Edgar P. Burkhart 2022-03-03 15:54:18 +01:00
parent 805b4219c5
commit a6c7343fbd
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -28,9 +28,10 @@ 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)
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)
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)