From 3be54138735fac359aef3d535ca01d7df03621d3 Mon Sep 17 00:00:00 2001 From: Noe Brucy Date: Fri, 25 Nov 2022 16:37:10 +0100 Subject: [PATCH] ratarmount --- scripts/pspec.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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: