Ratarmount support
This commit is contained in:
@@ -412,8 +412,13 @@ class SnapshotProcessor(HDF5Container):
|
||||
self.def_rules()
|
||||
|
||||
def init_pymses(self):
|
||||
# If ratarmount was used
|
||||
if os.path.exists(f"{self.path}/output_{self.num:05}/output_{self.num:05}"):
|
||||
path = f"{self.path}/output_{self.num:05}"
|
||||
else:
|
||||
path = self.path
|
||||
self._ro = pymses.RamsesOutput(
|
||||
self.path,
|
||||
path,
|
||||
self.num,
|
||||
order=self.params.pymses.order,
|
||||
verbose=self.params.pymses.verbose,
|
||||
@@ -1399,6 +1404,8 @@ class SnapshotProcessor(HDF5Container):
|
||||
def _sinks(self):
|
||||
|
||||
csv_name = f"{self.path}/output_{self.num:05}/sink_{self.num:05}.csv"
|
||||
if not os.path.exists(csv_name): # If ratarmount was used
|
||||
csv_name = f"{self.path}/output_{self.num:05}/output_{self.num:05}/sink_{self.num:05}.csv"
|
||||
|
||||
f = open(csv_name)
|
||||
first_line = f.readline()
|
||||
|
||||
Reference in New Issue
Block a user