diff --git a/run_wrf_dh.py b/run_wrf_dh.py index bd5aa802299b247ee8341868162148a5d6dca034..e769338b254a04de8cad50d29e70f2e9d22953a5 100644 --- a/run_wrf_dh.py +++ b/run_wrf_dh.py @@ -8,7 +8,7 @@ from mlair.workflows import DefaultWorkflow from mlair.helpers import remove_items from mlair.configuration.defaults import DEFAULT_PLOT_LIST -from mlair.model_modules.model_class import MyLSTMModel, MyCNNModel, MyLuongAttentionLSTMModel +from mlair.model_modules.model_class import IntelliO3TsArchitecture, MyLSTMModel, MyCNNModel, MyLuongAttentionLSTMModel import os @@ -42,9 +42,10 @@ def main(parser_args): # data_handler=DataHandlerSingleStation, # data_handler=DataHandlerSingleGridColumn, upsampeling=False, - epochs=200, + epochs=20, window_lead_time=4, window_history_size=6, + # ('Germany', (5.98865807458, 47.3024876979, 15.0169958839, 54.983104153)) stations=["coords__48_8479__10_0963", "coords__51_8376__14_1417", # "coords__50_7536__7_0827", "coords__51_4070__6_9656", @@ -67,6 +68,7 @@ def main(parser_args): # data_path='/home/felix/Data/WRF-Chem/test_cut_nc/', # data_path='/home/felix/Data/WRF-Chem/test_cut_nc_joint', # data_path="/home/felix/Data/WRF-Chem/test_cut_nc_joint/short_test", + # data_path="/media/felix/INTENSO/WRF_CHEM/hourly/cdo_output_test/jan_test", # data_path = "/p/scratch/deepacf/kleinert1/IASS_proc_monthyl", data_path="/media/felix/INTENSO/WRF_CHEM/JFM_2009", @@ -90,15 +92,18 @@ def main(parser_args): 'no2': {"method": "standardise"}, 'co': {"method": "standardise"}, 'PSFC': {"method": "standardise"}, - 'CLDFRA': {"method": "min_max","min": 0., "max": 1.}, + # 'CLDFRA': {"method": "min_max", "min": 0., "max": 1.}, }, - variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH', 'CLDFRA'], + # variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH', 'CLDFRA'], + variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH'], target_var='o3', # statistics_per_var={'T2': None, 'o3': None, 'wdir10ll': None, 'wspd10ll': None, # 'no': None, 'no2': None, 'co': None, 'PSFC': None, 'PBLH': None, 'CLDFRA': None, }, statistics_per_var={'T2': "average_values", 'o3': "dma8eu", 'wdir10ll': "average_values", 'wspd10ll': "average_values", 'no': "dma8eu", 'no2': "dma8eu", 'co': "dma8eu", - 'PSFC': "average_values", 'PBLH': "average_values", 'CLDFRA': "average_values", }, + 'PSFC': "average_values", 'PBLH': "average_values", + # 'CLDFRA': "average_values", + }, # separate_vars=["o3", "o3Sect", "o3SectLeft", "o3SectRight"], separate_vars=["o3", "o3Sect"], # variables=['T2', 'Q2', 'PBLH', 'U10ll', 'V10ll', 'wdir10ll', 'wspd10ll'], @@ -109,10 +114,11 @@ def main(parser_args): var_logical_z_coord_selector=0, targetvar_logical_z_coord_selector=0, aggregation_dim='bottom_top', - radius=100, # km + radius=200, # km start='2009-01-01', # end='2009-01-04', + #end='2009-01-31', end='2009-03-31', @@ -144,6 +150,7 @@ def main(parser_args): ################################### # test_start='2009-01-22', # test_end='2009-01-31', + ################################### test_start='2009-03-15', test_end='2009-03-31', diff --git a/run_wrf_dh_sector.py b/run_wrf_dh_sector.py index 688631ffd789e6cd0bb6733883eccb92990fb253..7c7fd3c8b06f9568b17124252879ee39b80feaeb 100644 --- a/run_wrf_dh_sector.py +++ b/run_wrf_dh_sector.py @@ -7,7 +7,8 @@ from mlair.data_handler.data_handler_wrf_chem import DataHandlerWRF, DataHandler from mlair.workflows import DefaultWorkflow from mlair.helpers import remove_items from mlair.configuration.defaults import DEFAULT_PLOT_LIST -from mlair.model_modules.model_class import MyLSTMModel, MyCNNModel, MyCNNModelSect + +from mlair.model_modules.model_class import IntelliO3TsArchitecture, MyLSTMModel, MyCNNModel, MyCNNModelSect import os @@ -37,13 +38,13 @@ def main(parser_args): train_min_length=1, val_min_length=1, test_min_length=1, # data_handler=DataHandlerSingleStation, # data_handler=DataHandlerSingleGridColumn, - epochs=1000, - window_lead_time=2, + epochs=10, + window_lead_time=4, window_history_size=6, stations=["coords__48_8479__10_0963", "coords__51_8376__14_1417", - "coords__50_7536__7_0827", "coords__51_4070__6_9656", - "coords__49_8421__7_8662", "coords__49_7410__7_1935", - "coords__51_1566__11_8182", "coords__51_4065__6_9660", + # "coords__50_7536__7_0827", "coords__51_4070__6_9656", + # "coords__49_8421__7_8662", "coords__49_7410__7_1935", + # "coords__51_1566__11_8182", "coords__51_4065__6_9660", # "coords__50_7333__7_1000", "coords__50_0000__8_0000", # "coords__48_7444__7_6000", "coords__51_0000__11_0000", # "coords__52_7555__8_1000", "coords__50_0000__2_0000", @@ -52,14 +53,16 @@ def main(parser_args): ], # data_handler=DataHandlerWRF, data_handler=DataHandlerMainSectWRF, #, - data_path="/p/scratch/deepacf/kleinert1/IASS_proc_monthyl", + # data_path="/p/scratch/deepacf/kleinert1/IASS_proc_monthyl", #data_path="/p/scratch/deepacf/kleinert1/IASS_proc", #data_path="/p/project/deepacf/intelliaq/kleinert1/DATA/WRF_CHEM_soft_ln_small_test", + data_path="/media/felix/INTENSO/WRF_CHEM/hourly/cdo_output_test/jan_test", common_file_starter="wrfout_d01", date_format_of_nc_file="%Y-%m", time_dim='XTIME', #external_coords_file='/p/project/deepacf/inbound_data/IASS_upload/coords.nc', - external_coords_file="/p/scratch/deepacf/kleinert1/IASS_proc/coords.nc", + # external_coords_file="/p/scratch/deepacf/kleinert1/IASS_proc/coords.nc", + external_coords_file="/media/felix/INTENSO/WRF_CHEM/monthly/coords.nc", transformation={ "T2": {"method": "standardise"}, "Q2": {"method": "standardise"}, @@ -72,12 +75,18 @@ def main(parser_args): 'no2': {"method": "standardise"}, 'co': {"method": "standardise"}, 'PSFC': {"method": "standardise"}, - 'CLDFRA': {"method": "min_max"}, + # 'CLDFRA': {"method": "min_max", "min": 0., "max": 1.}, }, - variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH', 'CLDFRA'], + # variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH', 'CLDFRA'], + variables=['T2', 'o3', 'wdir10ll', 'wspd10ll', 'no', 'no2', 'co', 'PSFC', 'PBLH'], target_var='o3', - statistics_per_var={'T2': None, 'o3': None, 'wdir10ll': None, 'wspd10ll': None, - 'no': None, 'no2': None, 'co': None, 'PSFC': None, 'PBLH': None, 'CLDFRA': None, }, + # statistics_per_var={'T2': None, 'o3': None, 'wdir10ll': None, 'wspd10ll': None, + # 'no': None, 'no2': None, 'co': None, 'PSFC': None, 'PBLH': None, 'CLDFRA': None, }, + statistics_per_var={'T2': "average_values", 'o3': "dma8eu", 'wdir10ll': "average_values", + 'wspd10ll': "average_values", 'no': "dma8eu", 'no2': "dma8eu", 'co': "dma8eu", + 'PSFC': "average_values", 'PBLH': "average_values", + # 'CLDFRA': "average_values", + }, # variables=['T2', 'Q2', 'PBLH', 'U10ll', 'V10ll', 'wdir10ll', 'wspd10ll'], # target_var=["T2"], # statistics_per_var={'T2': None, 'Q2': None, 'PBLH': None, @@ -87,44 +96,47 @@ def main(parser_args): targetvar_logical_z_coord_selector=0, aggregation_dim='bottom_top', - radius=100, # km + radius=200, # km start='2009-01-01', - #end='2009-01-04', - #end='2009-01-31', - end='2009-03-31', + # end='2009-01-04', + end='2009-01-31', + # end='2009-03-31', #train_start='2009-01-01', #train_end='2009-01-02', train_start='2009-01-01', - #train_end='2009-01-15', - train_end='2009-02-28', + train_end='2009-01-15', + # train_end='2009-02-28', #val_start='2009-01-02', #val_end='2009-01-03', ################################### - #val_start='2009-01-15', - #val_end='2009-01-22', + val_start='2009-01-15', + val_end='2009-01-22', ################################### - val_start='2009-03-01', - val_end='2009-03-14', + # val_start='2009-03-01', + # val_end='2009-03-14', #test_start='2009-01-03', #test_end='2009-01-04', ################################### - #test_start='2009-01-22', - #test_end='2009-01-31', + test_start='2009-01-22', + test_end='2009-01-31', ################################### - test_start='2009-03-15', - test_end='2009-03-31', + # test_start='2009-03-15', + # test_end='2009-03-31', - sampling='hourly', + # sampling='hourly', + sampling="daily", + input_output_sampling4toarstats=("hourly", "daily"), use_multiprocessing=True, interpolation_limit=0, # as_image_like_data_format=False, # model=MyLSTMModel, - model=MyCNNModelSect, +# model=MyCNNModelSect, + model=MyCNNModel, **parser_args.__dict__) workflow.run()