Skip to content

Add a forecast module #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 126 commits into from
Jul 28, 2016
Merged

Add a forecast module #180

merged 126 commits into from
Jul 28, 2016

Conversation

wholmgren
Copy link
Member

This PR implements a handful of classes that make it easy to access weather forecast data and convert it into a PV power forecast. The weather forecast data comes from U.S. national weather models via Unidata's THREDDS server and Siphon package.

The classes live in a new forecast.py module. Unlike the rest of the pvlib modules, forecast.py must be manually imported since it requires additional dependencies (netcdf and siphon).

See the documentation for details:

http://pvlib-python.readthedocs.io/en/forecast/forecasts.html

I see a number of ways this can proceed:

  1. Merge this after minor to moderate changes.
  2. Create an io or datareader subpackage within pvlib that contains forecast.py, tmy.py, and eventually other users' contributions.
  3. Create a separate pvlib-io or pvlib-datareader package that contains forecast.py and tmy.py, and eventually other users' contributions.
  4. Create a separate pvlib-forecast package that contains forecast.py and leaves tmy.py where it is.

I think there are roughly equal pros and cons for all of these approaches and I don't care much between them at this point. Most of these ideas were first discussed in #124.

Finally, this PR is a repeat of #124 but from pvlib/forecast to pvlib/master, rather than from my fork to pvlib/master. I hope putting the code on a branch of the pvlib repository makes it slightly easier for people to access the code and try it out. Please comment in #178 if you have opinions on if we should or should not use development branches and PRs like this.

MoonRaker and others added 30 commits November 4, 2015 11:06
@wholmgren
Copy link
Member Author

I rewrote much of the cloud cover to irradiance code to

  1. add a new algorithm that's based on the ineichen function's climatological clear sky data.
  2. make the assumptions in the algorithms more explicit.

Once again, readthedocs is struggling to build the documentation, so I'm hosting it here. In particular, see the Cloud cover and radiation section for more details on the new algorithm and API.

I also merged all of the recent changes to pvlib into this branch and made the tests more robust.

@wholmgren
Copy link
Member Author

I have the documentation partly working on readthedocs, in that it works except for the code on the forecast doc page. There's an issue with the conda package installations on rtd that prevents me from adding the dependencies needed for the documentation's forecast code to actually run. I can't reproduce it locally, but these problems fix themselves sooner or later. I added a note about this to the forecast page. So, I think we should call it good enough for now and not let it hold up merging this.

I'm planning to merge this and release later today.

Closes #206. Closes #86.

@GiorgioBalestrieri
Copy link

Hi @wholmgren, I'm not sure this is the appropriate place but I just noticed that, when installing pvlib through conda, the forecast module is not immediately available.

When doing import pvlib it does not seem to contain the forecast module. Doing from pvlib import forecast throws an error because netcdf4 and siphon are not installed.
Once these packages have been installed, it is possible to import the forecast module through from pvlib import forecast, which throws a warning due to the experimental nature of the module.

I'm quite sure this is the intended behavior (not adding heavy dependencies to pvlib by default), but I haven't found this information anywhere (besides the source code, of course).

By the way, it is awesome to have an open-source forecasting tool, and it's great to have it integrated in pvlib. Thanks!

@wholmgren
Copy link
Member Author

wholmgren commented Oct 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants