openclimatefix / quartz-frontend

Front End repo for the Nowcasting project.
https://openclimatefix.org/projects/nowcasting/
MIT License
103 stars 16 forks source link

Some Scottish GSPs appear wrong #370

Closed dantravers closed 1 year ago

dantravers commented 1 year ago

The GSP highlighted (and some of the other ones in Scotland especially), appear to be forecasting too high. They are showing 90+% yield.
In production. image

peterdudfield commented 1 year ago

Thanks @dantravers (good bug report),

In the database the MW installed capacity is 1.88 MW.

So 1.4/1.88 = 74%, so I agree it should be in the 70-90 range. Let me ping the api

dantravers commented 1 year ago

thanks @peterdudfield. Even in 70-90% range, it feels odd though. There are a few Scotish GSPs with large outturns, and cloud cover, while not 100%, isn't at all clear-sky conitions. That could be a more detailed aspect of the forecast in such GSPs. image

dantravers commented 1 year ago

Looking at this further - maybe it's also to do with PV_Live. The intra-day estimate is 1.9, whcih is higher than the reported capacity of 1.88!? image

peterdudfield commented 1 year ago

Ah, I found something that the capacity is 1MW not 1.88MW when looking at https://api.quartz.solar/v0/system/GB/gsp/?gsp_id=130

Lets check another one, Norwich Main, currently at 10-30%. 47.2 MW and capacity is 336, so 47/336 = 0.13%, so thats ok

peterdudfield commented 1 year ago

My guess 1.9 is a rounding up of 1.88, https://api.quartz.solar/v0/solar/GB/gsp/pvlive/130 shows the PVlive value is 1.911 MW. Interesting, need to check if 1.88 needs updating

peterdudfield commented 1 year ago

I think there are two issues

  1. int <-> float issue on GSP Capacity

We also see this on development

  1. PVlive values > capacity values.
from pvlive_api import PVLive
pvl = PVLive()
pvl.latest(entity_type="gsp", entity_id=130,extra_fields='installedcapacity_mwp')
(130, '2023-06-20T11:00:00Z', 1.91197, 1.883053)

Ill make a bug on Sheffield Solar github for this - https://github.com/SheffieldSolar/PV_Live-API/issues/23

peterdudfield commented 1 year ago

Screenshot 2023-06-20 at 12 40 43 This fits that the capacity is an int, but it hsuold be a float. This makes sense that this bug only shows up in Scotland, as the rounding error is more signifcant

dantravers commented 1 year ago

Yeah makes sense. I would have thought it might crop up in some of the small urban GSP, but it doesn't appear to. (at least right now)

peterdudfield commented 1 year ago

This should be solved by upgrading the datamodel in the api - https://github.com/openclimatefix/uk-pv-national-gsp-api/pull/224

peterdudfield commented 1 year ago

Screenshot 2023-06-20 at 14 29 54

Right = devlopment, left = production

This is now fized in api 1.4.8

peterdudfield commented 1 year ago

Ill upgrade production now

dantravers commented 1 year ago

Thanks - that looks much more sensible!