Skip to content

Commit 8be740a

Browse files
committed
Handle T_core addition in header and time_botT.h5
1 parent e510b1d commit 8be740a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

stagpy/stagyyparsers.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ def fields(fieldfile, only_header=False, only_istep=False):
406406
header['ti_ad'] = readbin('f') if magic >= 3 else 0
407407
header['erupta_total'] = readbin('f') if magic >= 5 else 0
408408
header['bot_temp'] = readbin('f') if magic >= 6 else 1
409+
header['core_temp'] = readbin('f') if magic >= 10 else 1
409410

410411
if magic >= 4:
411412
header['e1_coord'] = readbin('f', header['nts'][0])
@@ -894,4 +895,9 @@ def read_time_h5(h5folder):
894895
"""
895896
with h5py.File(h5folder / 'time_botT.h5', 'r') as h5f:
896897
for name, dset in h5f.items():
897-
yield int(name[-5:]), int(dset[2])
898+
isnap = int(name[-5:])
899+
if len(dset) == 3:
900+
istep = int(dset[2])
901+
else:
902+
istep = int(dset[0])
903+
yield isnap, istep

0 commit comments

Comments
 (0)