add an option to save all important files to path_out
This commit is contained in:
+7
-4
@@ -205,8 +205,7 @@ class RunSelector:
|
||||
return selected_runs, selected_nums
|
||||
|
||||
def load_namelist(self, run):
|
||||
path_run = self.path_in + "/" + run
|
||||
path_nml = path_run + "/" + self.nml_filename
|
||||
path_nml = f"{self.path_in}/{run}/{self.nml_filename}"
|
||||
return NamelistRecursive(f90nml.read(path_nml))
|
||||
|
||||
def get_nml_value(self, nml_key, run):
|
||||
@@ -281,8 +280,12 @@ class RunSelector:
|
||||
return runs
|
||||
|
||||
def load_info(self, run, num):
|
||||
info_filename = f"{self.path_in}/{run}/output_{num:05}/info_{num:05}.txt"
|
||||
info = read_ramses_info_file(info_filename)
|
||||
info_filename_output = f"{self.path_in}/{run}/output_{num:05}/info_{num:05}.txt"
|
||||
info_filename_folder = f"{self.path_in}/{run}/info/info_{num:05}.txt"
|
||||
if os.path.exists(info_filename_output):
|
||||
info = read_ramses_info_file(info_filename_output)
|
||||
else:
|
||||
info = read_ramses_info_file(info_filename_folder)
|
||||
return info
|
||||
|
||||
def get_nums(
|
||||
|
||||
Reference in New Issue
Block a user