Skip to content
Snippets Groups Projects
Commit 2e5e66a6 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

fix: Ensure correct weather data path is used

parent f1c54d59
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,7 @@ else: ...@@ -98,6 +98,7 @@ else:
weather_data_path = infile_path weather_data_path = infile_path
if year < today.year: if year < today.year:
weather_data_path = f"{infile_archive_path}{year}/" weather_data_path = f"{infile_archive_path}{year}/"
logging.info(f"Use weather data from {weather_data_path}")
# Path to store intermediary calculations and generated results # Path to store intermediary calculations and generated results
tmpfile_path = f"tmp/{year}/" tmpfile_path = f"tmp/{year}/"
...@@ -123,8 +124,8 @@ if last_wh_date is not None: ...@@ -123,8 +124,8 @@ if last_wh_date is not None:
start_date = last_wh_date - timedelta(days=2) start_date = last_wh_date - timedelta(days=2)
logging.info(f"Last date of WH calculations is {last_wh_date}. Start date = {start_date}") logging.info(f"Last date of WH calculations is {last_wh_date}. Start date = {start_date}")
weatherdata_files = glob.glob(f"{infile_path}{filename_pattern}") weatherdata_files = glob.glob(f"{weather_data_path}{filename_pattern}")
logging.debug(f"{infile_path}{filename_pattern}") logging.debug(f"{weather_data_path}{filename_pattern}")
logging.debug("What are the weatherdata files?") logging.debug("What are the weatherdata files?")
logging.debug(weatherdata_files) logging.debug(weatherdata_files)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment