-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_processing.py
More file actions
39 lines (33 loc) · 1.42 KB
/
main_processing.py
File metadata and controls
39 lines (33 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding:UTF-8 -*-
# ---------------------------------------------------------------------------------------------------------------------#
# Main program to analyze input data
# ---------------------------------------------------------------------------------------------------------------------#
# ---------------------------------------------------#
# Import packages
# ---------------------------------------------------#
# local functions
import ensoclopedia.script_preprocess as proc
# ---------------------------------------------------#
# collect process scripts
scripts = {
"f1a": proc.f01a_sst_eof_process,
"f1b": proc.f01b_ts_time_series_process,
"f1c": proc.f01c_gsat_reg_on_enso_process,
"f1d": proc.f01d_pr_change_process,
"f1e": proc.f01e_pr_change_process,
"f7a": proc.f07a_precursors_process,
# "t1": proc.t01_ssta_process,
}
scripts_names = sorted(list(scripts.keys()), key=lambda v: v.lower())
scripts_names_print = ", ".join(scripts_names)
print(__name__)
if __name__ == '__main__':
name = input("Which script do you want to run?\n Please enter one of: %s\n" % scripts_names_print)
while name not in scripts_names + ["all"]:
name = input("Given value %s does not correspond to a script\n Please enter one of: %s\n" % (
name, scripts_names_print))
if name == "all":
for k in scripts_names:
scripts[k]()
else:
scripts[name]()