Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nowcasting_dataset/data_sources/gsp/gsp_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ def drop_gsp_by_threshold(
if len(gsp_power) == 0:
return gsp_power, meta_data

# There is an extra GSP in the new data, GSP ID 0 for the national forecast,
# which is not in the metadata, so dropping here
gsp_power = gsp_power.drop(columns=0)

maximum_gsp = gsp_power.max()

keep_index = maximum_gsp >= threshold_mw
Expand Down
6 changes: 3 additions & 3 deletions tests/data/gsp/test.zarr/.zmetadata
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"datetime_gmt/.zarray": {
"chunks": [
25201
37657
],
"compressor": {
"blocksize": 0,
Expand All @@ -29,7 +29,7 @@
"datetime_gmt"
],
"calendar": "proleptic_gregorian",
"units": "minutes since 2016-01-01"
"units": "minutes since 2014-01-01"
},
"generation_mw/.zarray": {
"chunks": [
Expand Down Expand Up @@ -70,7 +70,7 @@
"id": "blosc",
"shuffle": 1
},
"dtype": "<U2",
"dtype": "<U21",
"fill_value": null,
"filters": null,
"order": "C",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/gsp/test.zarr/datetime_gmt/.zarray
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chunks": [
25201
37657
],
"compressor": {
"blocksize": 0,
Expand Down
2 changes: 1 addition & 1 deletion tests/data/gsp/test.zarr/datetime_gmt/.zattrs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"datetime_gmt"
],
"calendar": "proleptic_gregorian",
"units": "minutes since 2016-01-01"
"units": "minutes since 2014-01-01"
}
Binary file modified tests/data/gsp/test.zarr/datetime_gmt/0
Binary file not shown.
Binary file modified tests/data/gsp/test.zarr/generation_mw/0.0
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/data/gsp/test.zarr/gsp_id/.zarray
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"id": "blosc",
"shuffle": 1
},
"dtype": "<U2",
"dtype": "<U21",
"fill_value": null,
"filters": null,
"order": "C",
Expand Down
Binary file modified tests/data/gsp/test.zarr/gsp_id/0
Binary file not shown.
Binary file modified tests/data/gsp/test.zarr/installedcapacity_mwp/0.0
Binary file not shown.