Skip to content

ENH: add dni_extra parameter to erbs (#2655) - #2971

Open
dhrubchatterjee16-lang wants to merge 1 commit into
pvlib:mainfrom
dhrubchatterjee16-lang:erbs-dni-extra
Open

dhrubchatterjee16-lang wants to merge 1 commit into
pvlib:mainfrom
dhrubchatterjee16-lang:erbs-dni-extra

Conversation

@dhrubchatterjee16-lang

@dhrubchatterjee16-lang dhrubchatterjee16-lang commented Dec 2, 2026 •

Copy link
Copy Markdown
  • Closes Allow users to use own TOA as input for erbs #2655
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • Tests added
  • 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.

Following the discussion in #2655, this PR:

  • Adds a dni_extra parameter to pvlib.irradiance.erbs that accepts either a numeric extraterrestrial normal irradiance value/Series/array or a method name string passed to get_extra_radiation, defaulting to 'asce'.
  • Makes datetime_or_doy optional when numeric dni_extra is provided (raising ValueError if datetime_or_doy is omitted while dni_extra is a string or None).
  • Returns a DataFrame indexed by ghi.index when ghi is a pd.Series and datetime_or_doy is not a DatetimeIndex (consistent with erbs_driesse).
  • Updates test_erbs and test_erbs_min_cos_zenith_max_zenith for the 'asce' default and adds tests for dni_extra='spencer', numeric dni_extra, dni_extra=None, and ValueError cases.

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Hey @dhrubchatterjee16-lang! 🎉

Thanks for opening your first pull request! We appreciate your
contribution. Please ensure you have reviewed and understood the
contributing guidelines.

If AI is used for any portion of this PR, you must vet the content
for technical accuracy.

Finally, be sure the PR description includes the PR
checklist,
and complete the items you are able to.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to use own TOA as input for erbs

1 participant