-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
34 lines (25 loc) · 855 Bytes
/
main.py
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
#/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import multiprocessing as mp
from scr.logging_conf import logging_conf
from scr.read_config import read_config
from scr.read_inputs import read_data
from scr.pross_data import process_data
from scr.write import write_results
def main(pool):
"""Run PyLakeSMB
"""
logging_conf()
logging.info('STEP 0: READING CONFIGURATION FILES')
conf_run = read_config()
logging.info('STEP 1: READING DATA')
data = read_data(conf_run)
logging.info('STEP 2: PROCESSING DATA')
modeldata, modelparam = process_data(conf_run, data, pool)
logging.info('STEP 3: WRITING RESULTS')
write_results(modelparam, modeldata, conf_run)
logging.info('*** Moldel PyLakeSMB run succesfully ***')
if __name__ == '__main__':
pool = mp.Pool(mp.cpu_count())
main(pool)