Skip to content

Conversation

@aman-coder03
Copy link
Contributor

@aman-coder03 aman-coder03 commented Feb 9, 2026

  • Closes Add ModelChain temperature comparison example to system-models #2689
  • 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`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • 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.

This PR adds a new Sphinx-gallery example under docs/examples/system-models that demonstrates how to vary models within a ModelChain calculation.

@aman-coder03
Copy link
Contributor Author

this PR is not complete yet!
next commits shall include:defining a simple PV system and weather input, running ModelChain with different model options, adding plots to illustrate the impact on results

ax.set_title("Comparison of Temperature Models")
ax.legend()
plt.tight_layout()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The figures aren't appearing. Do you need to add plt.show()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added plt.show() so that the figures are displayed
also updated the example to use the correct temperature model parameters for each model and set aoi_model="no_loss" to avoid inference issues with the minimal PVWatts setup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figures still don't show. Are you sure they are being created when you run this locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-02-10 191608 i am getting this when running locally

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i change the title from Comparison of Temperature Models to Variations?

)

weather_subset = pd.DataFrame({
"ghi": 800,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to generate use clear-sky irradiance, and non-constant air temperature, which you can make up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am looking into this, will push the updated commit shortly!

'examples_dirs': ['../../examples'], # location of gallery scripts
'gallery_dirs': ['gallery'], # location of generated output
# execute all scripts except for ones in the "system-models" directory:
'filename_pattern': '^((?!system-models).)*$',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kandersolar are you OK with this change to the sphinx configuration for the example gallery?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe 'filename_pattern': '^((?!system-models).)*$', was added so as to not execute the oedi example which is in system-models
so i have preserved the same logic of not executing that example, but to execute the new added example plot_modelchain_model_variations.py, so that the figures are rendered.

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.

Add ModelChain temperature comparison example to system-models

2 participants