mirror of https://gitlab.com/pamhyr/pamhyr2
debug read_bin
parent
a317cd849f
commit
21876586df
|
|
@ -791,7 +791,7 @@ class AdisTSwc(AdisTS):
|
|||
c = np.fromfile(f, dtype=np.byte, count=1)
|
||||
# possible values :
|
||||
# sediment : C, G, M, D, L, N, R
|
||||
# polutant : C, G, M, D
|
||||
# polutant : C
|
||||
phys_var = bytearray(c).decode()
|
||||
data_tmp[key_pol][t][phys_var] = {}
|
||||
real_data = np.fromfile(f, dtype=np.float32, count=ismax)
|
||||
|
|
@ -817,24 +817,19 @@ class AdisTSwc(AdisTS):
|
|||
|
||||
print("reading bin files is ok =======")
|
||||
|
||||
for i in range(ismax):
|
||||
# print("first i: ", i)
|
||||
reach = ip_to_r(i)
|
||||
# print("reach i:", reach)
|
||||
# print("second i: ", i)
|
||||
p_i = ip_to_ri(reach, i)
|
||||
for r, reach in enumerate(reachs):
|
||||
for i in range(is1[r]-1, is2[r]):
|
||||
p_i = ip_to_ri(reach, i)
|
||||
|
||||
for t_data in timestamps_keys:
|
||||
pol_view = []
|
||||
for pol in pollutants_keys:
|
||||
# print("pol results: ",
|
||||
# type(list(data_tmp[pol][t_data].values())))
|
||||
pol_view.append(tuple(list(map(
|
||||
lambda data_el: data_el[p_i],
|
||||
list(data_tmp[pol][t_data].values())
|
||||
))))
|
||||
for t_data in timestamps_keys:
|
||||
pol_view = []
|
||||
for pol in pollutants_keys:
|
||||
pol_view.append(tuple(list(map(
|
||||
lambda data_el: data_el[i],
|
||||
list(data_tmp[pol][t_data].values())
|
||||
))))
|
||||
|
||||
reach.set(p_i, t_data, "pols", pol_view)
|
||||
reach.set(p_i, t_data, "pols", pol_view)
|
||||
|
||||
# ##print("pi_tmp: ", pi_tmp)
|
||||
# ##print("pol view: ", pol_view)
|
||||
|
|
|
|||
Loading…
Reference in New Issue