From 771de96d3d02b5cfa5b87c0ee8adad196cf853a5 Mon Sep 17 00:00:00 2001 From: 0xFrama Date: Tue, 27 Feb 2024 11:27:40 +0100 Subject: [PATCH] Replace H with h inside pandas' floor function --- quartz_solar_forecast/dataset/make_test_set.py | 2 +- quartz_solar_forecast/eval/nwp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/quartz_solar_forecast/dataset/make_test_set.py b/quartz_solar_forecast/dataset/make_test_set.py index eb4cf0b3..d96a6c07 100644 --- a/quartz_solar_forecast/dataset/make_test_set.py +++ b/quartz_solar_forecast/dataset/make_test_set.py @@ -116,7 +116,7 @@ def filter_timestamps_if_hf_files_exists(timestamps_full: pd.DatetimeIndex): fs = HfFileSystem() # print(fs.ls("datasets/openclimatefix/dwd-icon-eu/data/2022/4/11/", detail=False)) for timestamp in timestamps_full: - timestamp_floor = timestamp.floor("6H") + timestamp_floor = timestamp.floor("6h") _, huggingface_file = make_hf_filename(timestamp_floor) huggingface_file = huggingface_file[14:] diff --git a/quartz_solar_forecast/eval/nwp.py b/quartz_solar_forecast/eval/nwp.py index 1edc3a20..ac32f59d 100644 --- a/quartz_solar_forecast/eval/nwp.py +++ b/quartz_solar_forecast/eval/nwp.py @@ -81,7 +81,7 @@ def get_nwp_for_one_timestamp_one_location( # print(fs.ls("datasets/openclimatefix/dwd-icon-eu/data/2022/4/11/", detail=False)) # round timestamp to 6 hours floor - timestamp_floor = timestamp.floor("6H") + timestamp_floor = timestamp.floor("6h") date_and_hour, huggingface_file = make_hf_filename(timestamp_floor) # dataset variables, note these are unique for ICON