-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add ability to read local NSRDB PSM3 CSVs #841
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
Comments
Does a PSM3 file for a specific year follow the TMY3 format? I think the PSM3 also delivers TMY3 files, if requested. If it doesn't, then I'd say yes, a |
I believe the both the NSRDB Viewer and its API export single-year and TMY data in the SAM CSV format, which is what It occurs to me that a better name might be |
My earlier comment is an unclear mess. Let me try again. Does a PSM3 file for a specific year follow the TMY3 format? If the format is not TMY3, then I'd say a separate function to read that format could be of value. I don't have a preferred name, although You can get TMY3 files from the NSRDB by passing |
I think we need to distinguish TMY3 data from the TMY3 format. It is true that TMY data can be retrieved from the PSM3 API, but I believe it is returned in the SAM CSV format, not the TMY3 format.
No, and furthermore (as far as I am aware), all PSM3 data (both single-year and TMY; both web viewer and API) is returned in the SAM CSV format. [1] https://nsrdb.nrel.gov/about/tmy.html (scroll to "Format of TMY Data") |
Thanks; this clarifies that a new |
Unless I've missed something in the docs, the only pvlib function that parses PSM3 CSVs is
iotools.get_psm3
, which requires making a network request to the NSRDB PSM3 API. It would be nice to be able to read local PSM3 files (e.g. those downloaded manually from the NSRDB Viewer) in addition to requesting them from the web API. Here are a couple proposals:iotools.get_psm3
into its own functioniotools.read_psm3
, leavingget_psm3
as a networking wrapper around the PSM3 API that then callsread_psm3
on the API response.get_psm3
to check if the input is a filename instead of API parameters and retrieve data as appropriate.I'd favor the former since it separates networking code from parsing code. Some other
iotools.read_*
functions can make web requests, but those are just simple urls and more or less equivalent to reading a local file whereasget_psm3
has to construct a full API request.The text was updated successfully, but these errors were encountered: