mirror of https://gitlab.com/pamhyr/pamhyr2
debug results profiles read from bin
parent
84fd841f86
commit
02f14ffdf1
|
|
@ -506,8 +506,8 @@ class AdisTSlc(AdisTS):
|
|||
r = results.river.add(i)
|
||||
reachs.append(r)
|
||||
|
||||
is1[i] = data[2 * i] # first section of reach i (FORTRAN numbering)
|
||||
is2[i] = data[2 * i + 1] # last section of reach i (FORTRAN numbering)
|
||||
is1[i] = data[2 * i] - 1 # first section of reach i (FORTRAN numbering)
|
||||
is2[i] = data[2 * i + 1] - 1 # last section of reach i (FORTRAN numbering)
|
||||
|
||||
key = (is1[i], is2[i])
|
||||
iprofiles[key] = r
|
||||
|
|
@ -643,17 +643,37 @@ class AdisTSlc(AdisTS):
|
|||
print("pol keys: ", pollutants_keys)
|
||||
print("t keys: ", timestamps_keys)
|
||||
print("phys var: ", phys_data_names)
|
||||
#print("set timestamps keys: ", set(timestamps_keys))
|
||||
#print("isma")
|
||||
print("iprofiles: ", iprofiles)
|
||||
|
||||
pi_tmp = []
|
||||
reach_tmp = []
|
||||
|
||||
for i in range(ismax):
|
||||
#print("first i: ", i)
|
||||
reach = ip_to_r(i)
|
||||
reach_tmp.append(reach)
|
||||
#print("reach i:", reach)
|
||||
#print("second i: ", i)
|
||||
p_i = ip_to_ri(reach, i)
|
||||
pi_tmp.append(p_i)
|
||||
|
||||
for t_data in timestamps_keys:
|
||||
pol_view = []
|
||||
for pol in pollutants_keys:
|
||||
pol_view.append(set(data_tmp[pol][t_data].values()))
|
||||
#print("pol results: ", type(list(data_tmp[pol][t_data].values())))
|
||||
pol_view.append(tuple(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)
|
||||
print("reach from i: ", reach_tmp)
|
||||
#print("pol view: ", pol_view)
|
||||
#print("results: ", results)
|
||||
#results.set("timestamps", set(timestamps_keys))
|
||||
#print("------------------------set timestamps results meta data: ", set(timestamps_keys))
|
||||
|
||||
@timer
|
||||
def results(self, study, repertory, qlog=None, name=None):
|
||||
|
|
|
|||
|
|
@ -980,6 +980,7 @@ class Mage8(Mage):
|
|||
|
||||
# Add profile id correspondance to reach
|
||||
key = (i1, i2)
|
||||
print("mage keys reachs: ", key)
|
||||
iprofiles[key] = r
|
||||
|
||||
# Profile ID offset
|
||||
|
|
@ -1012,6 +1013,8 @@ class Mage8(Mage):
|
|||
]
|
||||
def ip_to_ri(r, i): return i - reach_offset[r]
|
||||
|
||||
print("mage iprofiles: ", iprofiles)
|
||||
|
||||
ts = set()
|
||||
end = False
|
||||
while not end:
|
||||
|
|
@ -1047,6 +1050,7 @@ class Mage8(Mage):
|
|||
|
||||
logger.debug(reachs[0].profiles[0]._data)
|
||||
results.set("timestamps", ts)
|
||||
print("set timestamps mage: ", ts)
|
||||
logger.info(f"read_bin: ... end with {len(ts)} timestamp read")
|
||||
|
||||
@timer
|
||||
|
|
|
|||
Loading…
Reference in New Issue