Skip to content
Snippets Groups Projects
run_hourly.py 1.05 KiB
__author__ = "Lukas Leufen"
__date__ = '2019-11-14'

import argparse

from mlair.workflows import DefaultWorkflow


def load_stations():
    import json
    try:
        filename = 'supplement/station_list_north_german_plain_rural.json'
        with open(filename, 'r') as jfile:
            stations = json.load(jfile)
    except FileNotFoundError:
        stations = None
    return stations


def main(parser_args):
    workflow = DefaultWorkflow(sampling="hourly", window_history_size=8, stations=load_stations(),
                               train_model=False,
                               create_new_model=False,
                               network="UBA",
                               plot_list=["PlotStationMap"], **parser_args.__dict__)
    workflow.run()


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('--experiment_date', metavar='--exp_date', type=str, default=None,
                        help="set experiment date as string")
    args = parser.parse_args(["--experiment_date", "testrun"])
    main(args)