mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug
This commit is contained in:
1 parent
539b63f765
commit
0a0eeb3c3f
2 files changed
+29
-25
No files matched your search
+23
-23
@@ -880,29 +880,29 @@ class AdisTSwc(AdisTS):
|
||||
) - k)
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
|
||||
# fifth line (useless)
|
||||
# fifth line (useless)
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
zmin_OLD = np.fromfile(f, dtype=np.float32, count=1)[0]
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
# sixth line
|
||||
zf = np.zeros(ismax, dtype=np.float32)
|
||||
z = np.zeros(ismax * 3, dtype=np.float32)
|
||||
for k in range(0, ismax, kbl):
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
zmin_OLD = np.fromfile(f, dtype=np.float32, count=1)[0]
|
||||
z[3 * k:3 * min(k + kbl, ismax)] = \
|
||||
np.fromfile(f,
|
||||
dtype=np.float32,
|
||||
count=3 * (min(k + kbl, ismax) - k)
|
||||
)
|
||||
# z[i*3+1] and z[i*3+2] are useless
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
# sixth line
|
||||
zf = np.zeros(ismax, dtype=np.float32)
|
||||
z = np.zeros(ismax * 3, dtype=np.float32)
|
||||
for k in range(0, ismax, kbl):
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
z[3 * k:3 * min(k + kbl, ismax)] = \
|
||||
np.fromfile(f,
|
||||
dtype=np.float32,
|
||||
count=3 * (min(k + kbl, ismax) - k)
|
||||
)
|
||||
# z[i*3+1] and z[i*3+2] are useless
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
zf = [z[i * 3] for i in range(ismax)]
|
||||
# seventh line (useless)
|
||||
for k in range(0, ismax, kbl):
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
zero = np.fromfile(f, dtype=np.int32, count=ismax)
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
# end header
|
||||
zf = [z[i * 3] for i in range(ismax)]
|
||||
# seventh line (useless)
|
||||
for k in range(0, ismax, kbl):
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
zero = np.fromfile(f, dtype=np.int32, count=ismax)
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
# end header
|
||||
|
||||
def ip_to_r(i):
|
||||
return iprofiles[
|
||||
@@ -924,6 +924,7 @@ class AdisTSwc(AdisTS):
|
||||
for file_bin in path_files:
|
||||
key_pol = os.path.basename(file_bin)[0:-4]
|
||||
data_tmp[key_pol] = {}
|
||||
logger.info(f"read_bin: Start reading '{file_bin}' ...")
|
||||
with open(file_bin, 'rb') as f:
|
||||
# header
|
||||
# first line
|
||||
@@ -975,7 +976,7 @@ class AdisTSwc(AdisTS):
|
||||
# seventh line (useless)
|
||||
for k in range(0, ismax, kbl):
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (start)
|
||||
zero = np.fromfile(f, dtype=np.int32, count=ismax)
|
||||
zero = np.fromfile(f, dtype=np.int32, count=min(k + kbl, ismax) - k)
|
||||
data = np.fromfile(f, dtype=np.int32, count=1) # (end)
|
||||
# end header
|
||||
# data
|
||||
@@ -1006,7 +1007,6 @@ class AdisTSwc(AdisTS):
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user