File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -707,14 +707,9 @@ class StagyyData:
707707 def __init__ (self , path : Optional [PathLike ] = None ):
708708 if path is None :
709709 path = conf .core .path
710- runpath = Path (path )
711- if runpath .is_file ():
712- parname = runpath .name
713- runpath = runpath .parent
714- else :
715- parname = 'par'
716- self ._rundir = {'path' : runpath ,
717- 'par' : parname }
710+ self ._parpath = Path (path )
711+ if not self ._parpath .is_file ():
712+ self ._parpath /= 'par'
718713 self ._par = parfile .readpar (self .parpath , self .path )
719714 self .scales = _Scales (self )
720715 self .refstate = _Refstate (self )
@@ -734,12 +729,12 @@ def __str__(self) -> str:
734729 @property
735730 def path (self ) -> Path :
736731 """Path of StagYY run directory."""
737- return self ._rundir [ 'path' ]
732+ return self ._parpath . parent
738733
739734 @property
740735 def parpath (self ) -> Path :
741736 """Path of par file."""
742- return self .path / self . _rundir [ 'par' ]
737+ return self ._parpath
743738
744739 @crop
745740 def hdf5 (self ) -> Optional [Path ]:
You can’t perform that action at this time.
0 commit comments