few bug solving

This commit is contained in:
Noe Brucy
2023-07-12 11:13:03 +02:00
parent 29a9150534
commit a1e4f775b6
4 changed files with 40 additions and 18 deletions
+5 -3
View File
@@ -40,7 +40,7 @@ class NamelistRecursive:
class RunSelector:
def __init__(
self,
path_in,
path_in=".",
in_runs=None,
in_nums="all",
nml_filename="run.nml",
@@ -93,7 +93,7 @@ class RunSelector:
sort_run_by : str, a key from the namelist used to sort the runs (by ascending order)
"""
# Initialize logger
self.logger = logging.getLogger("run_self")
self.logger.propagate = False
@@ -450,7 +450,9 @@ class RunSelector:
# Be sure we have a namelist
if self.fallback_nml and run not in self.namelist:
self.logger.warning(f"Used fallback namelist for run {run} from output {nums[0]}")
self.logger.warning(
f"Used fallback namelist for run {run} from output {nums[0]}"
)
path = f"{self.path_in}/{run}/output_{nums[0]:05}/namelist.txt"
self.namelist[run] = self.load_namelist(run, path=path)