Skip to content

Commit

Permalink
Evaluate (#83)
Browse files Browse the repository at this point in the history
* fixed the path to testset in evaluation script

* debugging the get_nwp function

* Added comment

* removed unnecessary
  • Loading branch information
roshnaeem authored Mar 12, 2024
1 parent 3a567b8 commit 7e7999e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
scripts/datapipes/test.nc
scripts/datapipes/UK_PV_metadata.csv
scripts/datapipes/nwp_data
quartz_solar_forecast/data
quartz_solar_forecast/data
6 changes: 4 additions & 2 deletions quartz_solar_forecast/eval/nwp.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def get_nwp_for_one_timestamp_one_location(
# fs = HfFileSystem()
# print(fs.ls("datasets/openclimatefix/dwd-icon-eu/data/2022/4/11/", detail=False))

# Ensure timestamp is a pd.Timestamp object
if not isinstance(timestamp, pd.Timestamp):
timestamp = pd.to_datetime(timestamp)

# round timestamp to 6 hours floor
timestamp_floor = timestamp.floor("6h")
date_and_hour, huggingface_file = make_hf_filename(timestamp_floor)
Expand Down Expand Up @@ -170,5 +174,3 @@ def get_nwp_for_one_timestamp_one_location(
print(f"Getting NWP for {timestamp} {pv_id}. Progress: {100*progress}%")

return df


0 comments on commit 7e7999e

Please sign in to comment.