File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313if typing .TYPE_CHECKING :
1414 from collections .abc import Mapping
15+ from pathlib import Path
1516
1617 from .datatypes import Field
1718 from .stagyydata import StagyyData
@@ -89,15 +90,14 @@ class StepSnapInfo:
8990
9091@dataclass (frozen = True )
9192class StepSnapH5 (StepSnap ):
92- sdat : StagyyData
93+ timeh5 : Path
9394
9495 @cached_property
9596 def _info (self ) -> StepSnapInfo :
9697 isnap = - 1
9798 step_to_snap = {}
9899 snap_to_step = {}
99- timeh5 = self .sdat .par .h5_output ("time_botT.h5" )
100- for isnap , istep in parsers .h5 .extras .isnap_istep (timeh5 ):
100+ for isnap , istep in parsers .h5 .extras .isnap_istep (self .timeh5 ):
101101 step_to_snap [istep ] = isnap
102102 snap_to_step [isnap ] = istep
103103 return StepSnapInfo (
Original file line number Diff line number Diff line change @@ -799,6 +799,7 @@ def _field_cache(self) -> FieldCache:
799799
800800 @cached_property
801801 def _step_snap (self ) -> StepSnap :
802- if self .hdf5 is not None :
803- return StepSnapH5 (sdat = self )
802+ timeh5 = self .par .h5_output ("time_botT.h5" )
803+ if timeh5 .is_file ():
804+ return StepSnapH5 (timeh5 = timeh5 )
804805 return StepSnapLegacy (sdat = self )
You can’t perform that action at this time.
0 commit comments