Daniel-Parke / PVGIS_TMY_POA_Irradiance_Model

Python script to download TMY data and calculate POA irradiance for any location in the world. Uses EU JRC PVGIS as source.
2 stars 1 forks source link

add cloud to calculation #1

Open tggo opened 3 months ago

tggo commented 3 months ago

Have you tried adding cloudiness from a weather forecast to this data? Like on solar.meteosource.com

Daniel-Parke commented 3 months ago

I have not, and most likely won't be in this repo in the short-medium term future.

The reason being is that the TMY (Typical Meteorological Year) data used from PVGIS already accounts for the variations caused by weather patterns at a given location. As it is using historic data to model annual typical time series performance, it is not meant to be used for short/long term accurate forecasting. So weather variations are accounted for, but in a TMY fashion not a short term predictive one.

I am currently working on a much larger and complex program that will model, analyse and optimise Hybrid On/Off Grid Energy systems, but that project is quite a lot bigger and most likely won't be open sourced fully I am afraid. There are elements in this that use historic data to estimate performance, but will also incorporate short term forecasts using a seperate methodology entirely.

This methodology of obtaining and processing TMY data has been refined quite a bit more in the newer project, and although I will eventually update this one, I am not going to do this until I have completely finished the other. It is already "done", but could do with a few QOL features before I move on, should be another 1-3 months before it is fully completed and I will update this repo with the new methodology.

This repo is more of a snapshot of one function I built for getting TMY data at a site that I thought might be useful for others, but I am focusing my efforts on the much larger model. I am doing this for fun to try and learn programming, so unfortunately I am time limited on this.

If you did want some form of short term predictive model this also isn't how I would suggest doing it, although you could repurpose most of the base functions. If you look in the solar folder for this repo you will see a lot of the base functions that are used to build the model.

What you need to essentially replace is the DNI, DHI and GHI values with ones that incorporate your estimated/predictive variables. Most of the base functions in solar_radiation.py can be repurposed depending on how accurate you want to go. I personally would start from ET_Horizontal Radiation and adjust the irradiation value from there using your own predictive variables, which may be easier and cleaner to do if you just started from scratch.

Apologies this won't do what you need to do (for now), but if you have any other questions just let me know!

Daniel-Parke commented 3 months ago

Have you tried adding cloudiness from a weather forecast to this data? Like on solar.meteosource.com

Follow up, I tried using their forecasting service for a historic day and site where I know the output was 27 kWh, and it stated that the output for that day would be 41 kWh.

That is a massive margin of error, so I would be wary using their numbers too much unless you can validate them elsewhere as well. I could have found the one exception to the rule, will try to verify their method if I can get my hands on more real life data.