Update pickling for U and graphUniform2
This commit is contained in:
parent
42e4cb4b45
commit
56c5e5c230
2 changed files with 7 additions and 4 deletions
|
@ -58,13 +58,13 @@ class OFModel:
|
|||
)
|
||||
_res_0 = np.loadtxt(_ft(self._t_dirs[0]))
|
||||
_x = _res_0[:, 0]
|
||||
_res = np.empty((self._t.size, _x.size))
|
||||
_res[0] = _res_0[:, 1]
|
||||
_res = np.empty((self._t.size, _x.size, _res_0.shape[1] - 1))
|
||||
_res[0] = _res_0[:, 1:]
|
||||
for _r, _dir in zip(_res[1:], self._t_dirs[1:]):
|
||||
_r[:] = np.loadtxt(_ft(_dir))[:, 1]
|
||||
_r[:] = np.loadtxt(_ft(_dir))[:, 1:]
|
||||
_dict = {
|
||||
f"x_{field}": _x,
|
||||
field: _res,
|
||||
field: np.squeeze(_res),
|
||||
}
|
||||
if func not in self._post_fields.keys():
|
||||
self._post_fields[func] = {}
|
||||
|
|
|
@ -47,6 +47,9 @@ model.read_field_all("p_rgh")
|
|||
model.read_field_all("U")
|
||||
|
||||
model.read_post("graphUniform", "alpha.water")
|
||||
model.read_post("graphUniform", "U")
|
||||
model.read_post("graphUniform2", "alpha.water")
|
||||
model.read_post("graphUniform2", "U")
|
||||
|
||||
with (
|
||||
gzip.open(out.joinpath("pickle.gz"), "wb")
|
||||
|
|
Loading…
Reference in a new issue