diff --git a/src/helpers.py b/src/helpers.py index 2589cfe88d187ac8ebdf488cc9ab84fb1598ada0..a1c508581449999215e3cb131b6e56befe9e9ac1 100644 --- a/src/helpers.py +++ b/src/helpers.py @@ -97,6 +97,10 @@ class TimeTracking(object): logging.info(f"{self._name} finished after {self}") +def get_host(): + return socket.gethostname() + + def prepare_host(create_new=True, sampling="daily"): hostname = socket.gethostname() try: diff --git a/src/run_modules/experiment_setup.py b/src/run_modules/experiment_setup.py index 95bd5056febbe06babfd59191332c1f4cb8078d4..47d3adb84976a30a03d035120890f062087b3d3c 100644 --- a/src/run_modules/experiment_setup.py +++ b/src/run_modules/experiment_setup.py @@ -6,6 +6,8 @@ import argparse import logging import os from typing import Union, Dict, Any +import socket + from src import helpers from src.run_modules.run_environment import RunEnvironment @@ -46,6 +48,8 @@ class ExperimentSetup(RunEnvironment): # experiment setup self._set_param("data_path", helpers.prepare_host(sampling=sampling)) + # self._set_param("hostname", helpers.get_host()) + self._set_param("hostname", "jwc0123") self._set_param("create_new_model", create_new_model, default=True) if self.data_store.get("create_new_model"): trainable = True diff --git a/src/run_modules/post_processing.py b/src/run_modules/post_processing.py index 158b29c6e25c8d1181872d700cb2a36114fabf6a..b32d030eff02948954ee980710b930fe36718ab9 100644 --- a/src/run_modules/post_processing.py +++ b/src/run_modules/post_processing.py @@ -199,7 +199,7 @@ class PostProcessing(RunEnvironment): forecast_path=path, plot_name_affix="cali-ref", plot_folder=self.plot_path) plot_conditional_quantiles(self.test_data.stations, pred_name="obs", ref_name="CNN", forecast_path=path, plot_name_affix="like-bas", plot_folder=self.plot_path) - if "PlotStationMap" in plot_list: + if ("PlotStationMap" in plot_list) and (not self.data_store.get("hostname")[:2] == "jw"): PlotStationMap(generators={'b': self.test_data}, plot_folder=self.plot_path) if "PlotMonthlySummary" in plot_list: PlotMonthlySummary(self.test_data.stations, path, r"forecasts_%s_test.nc", self.target_var,