Still improve loading

This commit is contained in:
Noe Brucy
2023-03-03 11:24:58 +01:00
parent ae8a8a605d
commit 301d08dce7
2 changed files with 44 additions and 14 deletions
+5 -3
View File
@@ -96,13 +96,15 @@ class StudyProcessor(Aggregator, HDF5Container):
for run in self.runs:
nml_src = f"{self.path}/{run}/{self.params.input.nml_filename}"
nml_dest = f"{self.path_out}/{run}/{self.params.input.nml_filename}"
copy_file(nml_src, nml_dest, update=1)
if os.path.exists(nml_src):
copy_file(nml_src, nml_dest, update=1)
logs = self.get_logs(run)
os.makedirs(f"{self.path_out}/{run}/logs", exist_ok=True)
for log in logs:
dest = f"{self.path_out}/{run}/logs/{os.path.basename(log)}"
copy_file(log, dest, update=1)
if os.path.exists(log):
copy_file(log, dest, update=1)
# Define rules
self.def_rules()
@@ -751,7 +753,7 @@ class StudyProcessor(Aggregator, HDF5Container):
"ssm": Rule(
self._surfacic_sink_mass,
group="/series/sinks_from_log",
unit=U.Msun / U.pc ** 2,
unit=U.Msun / U.pc**2,
description="Surfacic sink mass",
dependencies=["sinks_from_log"],
),