uw-midsun / strategy_msxvi

ASC & FSGP '24 & '25 Strategy
3 stars 12 forks source link

irradiance.py #41

Open kostubhagarwal opened 3 weeks ago

kostubhagarwal commented 3 weeks ago

similar to route_model.py where we parse gpx files for data, we need to get solar irradiance data from solcast's api.

we want the following metrics spatially and temporally.

previously we ran into performance issues setting up the db. it took 30+ minutes to refresh or set up the db from scratch. we suspect this was because of the rate limit. previously we were tyring to extract a table of 36hrs of data for every coordinate in our route model.

currently we don't have access to the commerical version of solcast (I am working on getting this), so we need to rely on data from the unmetered locations.

@bzzling I'd suggest making a "research" account and just messing around. It'll be tough to really work on irradiance.py without full access to the API.

Think about how, what, and when you want to get data. This is a complex problem. Eg. how and when do you refresh data?

ericli3690 commented 3 weeks ago

@bzzling

Allo, Kostubh had me on this task before but I'm a bit too busy these days so he's passing it on to you. The major problem I was considering was the sample rate over distance. Solcast's irradiance predictions seem to change a lot (for next-day forecasting, at least) even over short distances. The question is what amount of irradiance error we're willing to tolerate, because the race segments are like ~300km in length.

The four lines on the graph below are irradiance forecasts taken from points in Waterloo roughly 10km apart, moving westward. The y-axis is W/m^2, ghi (though note that Kostubh wants gti, not ghi; this was a mistake on my part) and the x-axis is time in hours. Specifically:

Dark Blue: (43.47, -80.53) Orange: (43.47, -80.63) Dark Green: (43.47, -80.73) Light Blue: (43.47, -80.83)

image

Hopefully this helps, let me know if you want me to help out with anything.

bzzling commented 3 weeks ago

@ericli3690

Thanks for letting me know about this! That does seems pretty weird, so I'll let def ask you if I run into anything else.

kostubhagarwal commented 3 weeks ago

@ericli3690 good work with the analysis. also i don't think the ghi and gti decision is trivial, it matters how sensitive our cars performance is to orientation (which is something that may be negligible).

kostubhagarwal commented 3 weeks ago

The other thing is their ghi & gti values account for clouds and stuff. So on certain days, it may vary more or less. I don't really know. We also use wind data from solcast for our drag calculations, not sure how much that varies spatially.

kostubhagarwal commented 3 weeks ago

You guys can also reach out to support@solcast.com [undefined:support@solcast.com]. They are oftern helpful with these kinds of questions.