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)
|
c = np.fromfile(f, dtype=np.byte, count=1)
|
||||||
# possible values :
|
# possible values :
|
||||||
# sediment : C, G, M, D, L, N, R
|
# sediment : C, G, M, D, L, N, R
|
||||||
# polutant : C, G, M, D
|
# polutant : C
|
||||||
phys_var = bytearray(c).decode()
|
phys_var = bytearray(c).decode()
|
||||||
data_tmp[key_pol][t][phys_var] = {}
|
data_tmp[key_pol][t][phys_var] = {}
|
||||||
real_data = np.fromfile(f, dtype=np.float32, count=ismax)
|
real_data = np.fromfile(f, dtype=np.float32, count=ismax)
|
||||||
|
|
@ -817,24 +817,19 @@ class AdisTSwc(AdisTS):
|
||||||
|
|
||||||
print("reading bin files is ok =======")
|
print("reading bin files is ok =======")
|
||||||
|
|
||||||
for i in range(ismax):
|
for r, reach in enumerate(reachs):
|
||||||
# print("first i: ", i)
|
for i in range(is1[r]-1, is2[r]):
|
||||||
reach = ip_to_r(i)
|
p_i = ip_to_ri(reach, i)
|
||||||
# print("reach i:", reach)
|
|
||||||
# print("second i: ", i)
|
|
||||||
p_i = ip_to_ri(reach, i)
|
|
||||||
|
|
||||||
for t_data in timestamps_keys:
|
for t_data in timestamps_keys:
|
||||||
pol_view = []
|
pol_view = []
|
||||||
for pol in pollutants_keys:
|
for pol in pollutants_keys:
|
||||||
# print("pol results: ",
|
pol_view.append(tuple(list(map(
|
||||||
# type(list(data_tmp[pol][t_data].values())))
|
lambda data_el: data_el[i],
|
||||||
pol_view.append(tuple(list(map(
|
list(data_tmp[pol][t_data].values())
|
||||||
lambda data_el: data_el[p_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("pi_tmp: ", pi_tmp)
|
||||||
# ##print("pol view: ", pol_view)
|
# ##print("pol view: ", pol_view)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue