[run_selector] add filter_name option to select tool

This commit is contained in:
Noe Brucy
2021-01-04 16:43:59 +01:00
parent dafe6a6764
commit d78d33ef83
+6 -1
View File
@@ -124,6 +124,7 @@ class RunSelector:
runs=None, runs=None,
nums="all", nums="all",
filter_nml={}, filter_nml={},
filter_name="*",
sort_run_by=None, sort_run_by=None,
time_min=None, time_min=None,
time_max=None, time_max=None,
@@ -140,6 +141,10 @@ class RunSelector:
"last" select only the last output. "last" select only the last output.
"all" preselect all outputs (default) "all" preselect all outputs (default)
filter_name : str.
glob pattern used to filter run names.
default is "*" (all runs)
filter_nml : tuple or list of tupple. filter_nml : tuple or list of tupple.
Filter runs by namelist. Filter runs by namelist.
tuples are in the following form: tuples are in the following form:
@@ -160,7 +165,7 @@ class RunSelector:
""" """
selected_runs = self.get_runs( selected_runs = self.get_runs(
runs, "*", filter_nml, sort_run_by, do_tests=False runs, filter_name, filter_nml, sort_run_by, do_tests=False
) )
if len(selected_runs) == 0: if len(selected_runs) == 0: