pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

[ENH] download and use horizon data to affect sky diffuse and far shading

Open mikofski opened this issue 3 years ago • 4 comments

Problem statement

  1. most satellite data (CPR, SGIS, PSM3, ...) doesn't include effects of horizon, this info is downloaded separately, but pvlib doesnt' currently have any iotools for horizon download. Some sources for horizon data are pvgis and meteonorm, but make sure to follow the correct conventions. Also it's possible that horizon data can be derived from GIS elevation data like USGS or SRTM.
  2. once horizon data is obtained in the format {azimuth, elevation} then it can be applied to (a) reduce the sky dome of isotropic diffuse sky irradiance by integrating the ratio of the solid angles and (b) account for "far shading" or shade that affects the entire PV array uniformly, eg like the sun being partially obscured by a very distant (typically >30-km) mountain,

Describe the solution you'd like

  1. add pvgis horizon download to iotools
  2. complete #758 which given a horizon profile (azimuth, elevation) calculates the effect on diffuse sky
  3. ditto for far shading

Describe alternatives you've considered require users to account for horizon effects in the satellite data separately. pvgis already offers this option, but afaik, psm3 does not. Not sure about cpr or sgis

Additional context

  • related to #758
  • @annalisemckenzie adding the pvgis download could be a good first contribution, interested?

mikofski avatar Aug 25 '21 18:08 mikofski

@mikofski - Has someone done a PR for this ? If not, I can take a stab at it, if you want to mentor

UGuntupalli avatar Feb 08 '22 21:02 UGuntupalli

#1395 is the most recent work. I haven't gotten far enough to see if #1395 supercedes #1295. #1395 has picked up some, but not all of the code in #758 which is stalled and unlikely to move ahead.

cwhanse avatar Feb 08 '22 21:02 cwhanse

#1395 doesn't include #1295 but will work along side it. This would give us three methods to calculate horizon: locally using the horizon module as well as downloading preprocessed results from pvgis (implemented in #1395) or the method from #1295 in the iotools module

bgpierc avatar Feb 08 '22 23:02 bgpierc

@bgpierc - I am willing to take a stab at it this weekend, can you please do me a favor and guide me to what is the ask here, the issues are a little confusing to catch up on because of my lack of familiarity with pvlib and what has already been done and what needs to be achieved

UGuntupalli avatar Feb 10 '22 20:02 UGuntupalli