forked from lzhenn/cmip6-to-wrfinterm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_c2w.py
42 lines (29 loc) · 938 Bytes
/
run_c2w.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
35
36
37
38
39
40
41
42
#/usr/bin/env python3
'''
Date: Feb 25, 2021
This is the main script to drive the CMIP6-WRF data extraction.
Revision:
Jul 3, 2022 --- Revised for NCL version
Feb 25, 2021 --- MVP v0.01 completed
Zhenning LI
'''
import numpy as np
import pandas as pd
import datetime
import lib
import logging, logging.config
from utils import utils
def main_run():
# logging manager
logging.config.fileConfig('./conf/logging_config.ini')
utils.write_log('Read Config...')
cfg_hdl=lib.cfgparser.read_cfg('./conf/config-miroc6.ini')
utils.write_log('Construct CMIPHandler...')
cmip_hdl=lib.cmip_handler.CMIPHandler(cfg_hdl)
for time_frm in cmip_hdl.out_time_series:
utils.write_log('Processing time: '+str(time_frm))
cmip_hdl.interp_data(time_frm)
utils.write_log('Writing time: '+str(time_frm))
cmip_hdl.write_wrfinterm(time_frm)
if __name__=='__main__':
main_run()