Skip to content

Add ability to read local NSRDB PSM3 CSVs #841

Closed
@kandersolar

Description

@kandersolar

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:

  • Break out the parsing code in iotools.get_psm3 into its own function iotools.read_psm3, leaving get_psm3 as a networking wrapper around the PSM3 API that then calls read_psm3 on the API response.
  • Modify 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 whereas get_psm3 has to construct a full API request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions