diff --git a/openmc/statepoint.py b/openmc/statepoint.py index 53e50350f21..284da668637 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -410,14 +410,21 @@ def tallies(self): # Iterate over all tallies for tally_id in tally_ids: - tally = openmc.Tally(tally_id) - self._populate_tally(tally) - self._tallies[tally_id] = tally + tally = self._read_tally(tally_id) + if tally is not None: + self._tallies[tally_id] = tally self._tallies_read = True return self._tallies + def _read_tally(self, tally_id): + if self._f['tallies'][f'tally {tally_id}'].attrs.get('internal'): + return + tally = openmc.Tally(tally_id) + self._populate_tally(tally) + return tally + def _populate_tally(self, tally): group = self._f['tallies'][f'tally {tally.id}']