Add retrieval function for horizon profile from MINES Paris Tech
- [x] I am familiar with the contributing guidelines
- [x] Tests added
- [x] Updates entries to
docs/sphinx/source/api.rstfor API changes. - [x] Adds description and name entries in the appropriate "what's new" file in
docs/sphinx/source/whatsnewfor all changes. Includes link to the GitHub Issue with:issue:`num`or this Pull Request with:pull:`num`. Includes contributor name and/or GitHub username (link with:ghuser:`user`). - [x] New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
- [x] Pull request is nearly complete and ready for detailed review.
- [x] Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.
The proposed function retrieves the local horizon profile for a specific location (latitude, longitude, and elevation). The returned horizon profile has a resolution of 1 degree in the azimuth direction. The service is provided by MINES ParisTech though I cannot find any official documentation for it.
The function added in this PR (pvlib.iotools.get_mines_horizon) is very similar to the function added in #1395 (pvlib.iotools.get_pvgis_horizon).
@mikofski @cwhanse I saw your discussions in #758 and #1290 and figured I'd share the code I had laying around for downloading the local horizon profile from SRTM. Does this have any interest to you?
I'm lovin' this! Could we also look into retrieving pvgis horizon data, how do they compare to the SRTM from MINES?
MINES appears to have slightly changed their API, we need to skip one more row (to 26)
horizon = pd.read_csv(io.StringIO(res.text), skiprows=26, nrows=360, delimiter=';')
Thank you @bgpierc! If you are already using it, I'd be happy to hear if you find it useful and how it may compare to other sources you are using.
Within a month or so I'll return and hopefully finish this PR fyi.
Thanks, I've implemented a similar function to pull from pvgis and one to calculate directly from a DEM in #1395, all three methods appear to line up well (within ~2 degrees MAE) with each other and field data I've taken, so it's looking good
@YvesMSaintDrenan Are you ok with adding this function to pvlib?
I'm reluctant to merge this PR without something satisfying in the
Referencessection :/
The service has a notably better azimuthal resolution than PVGIS, but I agree that the missing documentation is a bummer.
@YvesMSaintDrenan could you perhaps add a subpage to the SoDa Pro website or upload a short note describing the service somewhere?