diff --git a/nowcasting_dataset/data_sources/gsp/gsp_data_source.py b/nowcasting_dataset/data_sources/gsp/gsp_data_source.py index 23495893..e7116101 100644 --- a/nowcasting_dataset/data_sources/gsp/gsp_data_source.py +++ b/nowcasting_dataset/data_sources/gsp/gsp_data_source.py @@ -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 diff --git a/tests/data/gsp/test.zarr/.zmetadata b/tests/data/gsp/test.zarr/.zmetadata index 75d19b26..8ec61b21 100644 --- a/tests/data/gsp/test.zarr/.zmetadata +++ b/tests/data/gsp/test.zarr/.zmetadata @@ -6,7 +6,7 @@ }, "datetime_gmt/.zarray": { "chunks": [ - 25201 + 37657 ], "compressor": { "blocksize": 0, @@ -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": [ @@ -70,7 +70,7 @@ "id": "blosc", "shuffle": 1 }, - "dtype": "