Skip to content

Add NSRDB PSM4 polar and polar TMY iotools#2807

Open
AdamRJensen wants to merge 10 commits into
pvlib:mainfrom
AdamRJensen:add-nsrdb-polar-iotools
Open

Add NSRDB PSM4 polar and polar TMY iotools#2807
AdamRJensen wants to merge 10 commits into
pvlib:mainfrom
AdamRJensen:add-nsrdb-polar-iotools

Conversation

@AdamRJensen

@AdamRJensen AdamRJensen commented Jul 5, 2026

Copy link
Copy Markdown
Member
  • Closes Add NSRDB polar datasets #2639, see also Adding functions for retrieving NSRDB PSM4 Polar datasets #2640
  • 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
  • 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.

@AdamRJensen AdamRJensen added io remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen marked this pull request as draft July 5, 2026 04:50
@AdamRJensen AdamRJensen added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen added remote-data triggers --remote-data pytests and removed remote-data triggers --remote-data pytests labels Jul 5, 2026
@AdamRJensen AdamRJensen marked this pull request as ready for review July 5, 2026 05:34
@AdamRJensen

Copy link
Copy Markdown
Member Author

Ready for review!

Test failures are unrelated.

@IoannisSifnaios IoannisSifnaios left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the only (?) difference between the get_nsrdb_psm4_polar and get_nsrdb_psm4_polar_tmy is that the second has year='tmy' (and a different URL). I assume you split it into two functions to follow the iotools convention, but honestly I could easily see it being one function...

I guess you could add a test for a bad request (api_key or location).

Otherwise LGTM (but I couldn't evaluate the readthedocs)!

Comment thread pvlib/iotools/psm4.py
NLR API uses this to automatically communicate messages back
to the user only if necessary
year : int or str
PSM4 API parameter specifing year (e.g. ``2023``) to download. The

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
PSM4 API parameter specifing year (e.g. ``2023``) to download. The
The year(s) the PSM4 API parameter should download (e.g. ``2023``). The

Comment thread pvlib/iotools/psm4.py
leap_day : bool, default : True
include leap day in the results
full_name : str, default 'pvlib python'
optional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The name of the user requesting data.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you agree to this, add it also to the TMY function

Comment thread pvlib/iotools/psm4.py
full_name : str, default 'pvlib python'
optional
affiliation : str, default 'pvlib python'
optional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The affiliation of the user requesting data.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you agree to this, add it also to the TMY function

Comment thread pvlib/iotools/psm4.py
Comment on lines +656 to +659
latitude : float or int
in decimal degrees, between 60 and 90 degrees north
longitude : float or int
in decimal degrees, between -180 and 180, east is positive

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I couldn't easily find the locations where data exists. Is there some link we could provide or something (even the NSRDB API example is a bit confusing because they report longitude first...)

Comment thread pvlib/iotools/psm4.py
Returns
-------
data : pandas.DataFrame
timeseries data from NLR PSM4

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
timeseries data from NLR PSM4
timeseries data from NLR PSM4 Polar dataset

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you agree to this, add it also to the TMY function

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

Labels

io remote-data triggers --remote-data pytests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add NSRDB polar datasets

2 participants