diff --git a/scripts/pspec.py b/scripts/pspec.py index 84a02ae..3176fe7 100644 --- a/scripts/pspec.py +++ b/scripts/pspec.py @@ -524,7 +524,12 @@ def main(arg): read_lvl = None if True: # Load output ------------------------------------------------------------------ - ro = pymses.RamsesOutput(arg.repo, iout, order=arg.order) + # If ratarmount was used + if os.path.exists(f"{self.path}/output_{self.num:05}/output_{self.num:05}"): + path = f"{arg.repo}/output_{self.num:05}" + else: + path = arg.repo + ro = pymses.RamsesOutput(path, iout, order=arg.order) if arg.magnetic: amr = ro.amr_source(["rho", "vel", "Bl", "Br"]) else: