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

Add examples for run_model_from_poa() and run_model_from_effective_irradiance()

Open Chirag3841 opened this issue 2 weeks ago • 3 comments

@cwhanse

  • [ ] Closes #1043
  • [x] I am familiar with the contributing guidelines
  • [ ] Tests added
  • [ ] Updates entries in docs/sphinx/source/reference for API changes.
  • [ ] Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for 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.
  • [ ] Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

Description

This pull request adds clear and practical usage examples to the run_model_from_poa and run_model_from_effective_irradiance methods in pvlib.modelchain.ModelChain. These two functions are widely used, but until now the documentation did not contain complete examples demonstrating how to prepare input data or how the methods should be used in real workflows.

This PR introduces both single-array and multi-array examples for each method. The single-array examples show a minimal and straightforward modeling setup using PVSystem, Location, and ModelChain along with the required irradiance or effective irradiance DataFrame. The multi-array examples demonstrate how to correctly structure per-array inputs, showing how users should supply multiple DataFrames with aligned indexes and consistent ordering to match the system’s arrays.

These examples are especially important because multi-array usage is not intuitive without seeing a working format.

Chirag3841 avatar Dec 11 '25 16:12 Chirag3841

@cwhanse Fresh PR created as per requirement.

Chirag3841 avatar Dec 11 '25 16:12 Chirag3841

@cwhanse Any changes required sir now ?

Chirag3841 avatar Dec 11 '25 18:12 Chirag3841

@cwhanse Sir what can I do now ?

Chirag3841 avatar Dec 12 '25 12:12 Chirag3841

@cwhanse Sir what can I do now ?

Have you tried to run the examples? When I do, I get errors: Array is not imported, Array doesn't take tilt as a parameter, probably others. It's important that examples are executable for a user.

cwhanse avatar Dec 16 '25 22:12 cwhanse

Okay sir I will do that

Chirag3841 avatar Dec 17 '25 03:12 Chirag3841