Skip to content
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

WIND Toolkit downloads use wtk-download API endpoint #1374

Merged
merged 5 commits into from
Mar 16, 2023
Merged

Conversation

cpaulgilman
Copy link
Collaborator

@cpaulgilman cpaulgilman commented Mar 15, 2023

Description

Switch wind resource file downloads on the Wind Power model's Wind Resource page from wtk-srw-download to wtk-download to provide access to subhourly wind data from WIND Toolkit.

Goes with https://github.com/NREL/SAM-private/pull/88.

Testing requires building SAM private to access SAM API keys.

Notes:

  • The WIND Toolkit API does not provide an endpoint equivalent to the NSRDB API's NSRDB Data Query endpoint that provides a list of available endpoints, so wind data downloads can only access the wtk-download endpoint. SAM users who want to download data from the wind datasets for other countries can use RE Explorer.
  • SAM supports the WIND Toolkit CSV format in addition to the SRW format as of Support WIND Toolkit CSV format ssc#985.

Fixes #815

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:

If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@cpaulgilman cpaulgilman added this to the 2022.11.21 Patch 2 milestone Mar 15, 2023
Copy link
Collaborator

@sjanzou sjanzou left a comment

Choose a reason for hiding this comment

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

Works nicely in SAM-private per attached docx
GitHubPullRequestsSAM_1374.docx

Copy link
Collaborator

@brtietz brtietz left a comment

Choose a reason for hiding this comment

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

Thanks for updating this! Always love PRs that maintain or improve functionality with less code than they started with.

@cpaulgilman cpaulgilman merged commit 36b5ee2 into patch Mar 16, 2023
@cpaulgilman cpaulgilman deleted the wind-toolkit branch March 16, 2023 15:17
@cpaulgilman cpaulgilman mentioned this pull request Mar 16, 2023
14 tasks
cpaulgilman added a commit that referenced this pull request Mar 17, 2023
* Cambium update to 2022 (#1365)

* Update to Cambium 2022

* Update URL in webapis.conf.

* On UI form, read UUID from URL in webapis.conf instead of hard coding it. Future updates should only require updating the URL in webapis.conf.

* Revise tooltip descriptions to be Cambium version agnositc.

* Fix UI group box sizes so Merchant Plant Revenue page are all same size.

* Cambium sample script

* Update sample script to Cambium 2020.

* Update sample script to work for all PPA models, including Host Developer.

* Cambium macro button for PPA models

* Create macro based on sample script and add button to Revenue or Time of Delivery input page for all PPA models.

* Help revisions for Cambium 2022

* UI adjustments for Mac/Linux

* Update multiple year downloads for Cambium 2022

* Add optional escalation rate input and update defaults
* Support non-monotonic available years from Cambium (Cambium 2020 years were even years, Cambium 2022 varies)
* Update Help
* Update UI descriptions and tooltips

* Fix application of cambium escalation for copied data

* Fix cambium progress bar text

* Allow escalation for single-year download

* Help updates for cambium single-year escalation

* Fix input number format

* WIND Toolkit downloads use wtk-download API endpoint (#1374)

* Migrate from wtk-srw-download to wtk-download

* Adds option to download subhourly wind resource data

* Fix intervals list

* Clean up WIND Toolkit download messages

* Fix string declarations and typo
cpaulgilman added a commit that referenced this pull request Mar 23, 2023
* Cambium update to 2022 (#1365)

* Update to Cambium 2022

* Update URL in webapis.conf.

* On UI form, read UUID from URL in webapis.conf instead of hard coding it. Future updates should only require updating the URL in webapis.conf.

* Revise tooltip descriptions to be Cambium version agnositc.

* Fix UI group box sizes so Merchant Plant Revenue page are all same size.

* Cambium sample script

* Update sample script to Cambium 2020.

* Update sample script to work for all PPA models, including Host Developer.

* Cambium macro button for PPA models

* Create macro based on sample script and add button to Revenue or Time of Delivery input page for all PPA models.

* Help revisions for Cambium 2022

* UI adjustments for Mac/Linux

* Update multiple year downloads for Cambium 2022

* Add optional escalation rate input and update defaults
* Support non-monotonic available years from Cambium (Cambium 2020 years were even years, Cambium 2022 varies)
* Update Help
* Update UI descriptions and tooltips

* Fix application of cambium escalation for copied data

* Fix cambium progress bar text

* Allow escalation for single-year download

* Help updates for cambium single-year escalation

* Fix input number format

* WIND Toolkit downloads use wtk-download API endpoint (#1374)

* Migrate from wtk-srw-download to wtk-download

* Adds option to download subhourly wind resource data

* Fix intervals list

* Clean up WIND Toolkit download messages

* Fix string declarations and typo

* Move geocoding URLs to webapis.conf

Update SAM CMakeLists.txt for new geotools.cpp

New URLs in webapis.conf file for geocoding, static map, and time zone APIs.

New URL in webapis.conf for calls to URDB wiki (for consistency, not related to geocoding)

Move geocoding functions from WEX to new geotools.cpp file.

Move LK `geocode()` from WEX to SAM so it can access SAM API keys.

Define variables for Bing, Google, and special NREL Geocode API keys so that they can be managed in teh same way as SAM API key.

Add new `user_email` variable so that open source versions of SAM can use NREL developer APIs that require an email parameter.

Rename `GeoCodeDeveloper()` to `GeocodeDeveloper()`;

Remove `SetApiKeys()` function, which is only required to make geocoding API keys available in WEX.
cpaulgilman added a commit that referenced this pull request Apr 14, 2023
* Cambium update to 2022 (#1365)

* Update to Cambium 2022

* Update URL in webapis.conf.

* On UI form, read UUID from URL in webapis.conf instead of hard coding it. Future updates should only require updating the URL in webapis.conf.

* Revise tooltip descriptions to be Cambium version agnositc.

* Fix UI group box sizes so Merchant Plant Revenue page are all same size.

* Cambium sample script

* Update sample script to Cambium 2020.

* Update sample script to work for all PPA models, including Host Developer.

* Cambium macro button for PPA models

* Create macro based on sample script and add button to Revenue or Time of Delivery input page for all PPA models.

* Help revisions for Cambium 2022

* UI adjustments for Mac/Linux

* Update multiple year downloads for Cambium 2022

* Add optional escalation rate input and update defaults
* Support non-monotonic available years from Cambium (Cambium 2020 years were even years, Cambium 2022 varies)
* Update Help
* Update UI descriptions and tooltips

* Fix application of cambium escalation for copied data

* Fix cambium progress bar text

* Allow escalation for single-year download

* Help updates for cambium single-year escalation

* Fix input number format

* WIND Toolkit downloads use wtk-download API endpoint (#1374)

* Migrate from wtk-srw-download to wtk-download

* Adds option to download subhourly wind resource data

* Fix intervals list

* Clean up WIND Toolkit download messages

* Fix string declarations and typo

* Move geocoding URLs to webapis.conf

Update SAM CMakeLists.txt for new geotools.cpp

New URLs in webapis.conf file for geocoding, static map, and time zone APIs.

New URL in webapis.conf for calls to URDB wiki (for consistency, not related to geocoding)

Move geocoding functions from WEX to new geotools.cpp file.

Move LK `geocode()` from WEX to SAM so it can access SAM API keys.

Define variables for Bing, Google, and special NREL Geocode API keys so that they can be managed in teh same way as SAM API key.

Add new `user_email` variable so that open source versions of SAM can use NREL developer APIs that require an email parameter.

Rename `GeoCodeDeveloper()` to `GeocodeDeveloper()`;

Remove `SetApiKeys()` function, which is only required to make geocoding API keys available in WEX.

* Replace remaning hard-coded urls with calls to SamApp::WebApi()

* Update test results for NREL/ssc#1010
@cpaulgilman cpaulgilman added the added to release notes PR and/or issue has been added to release notes for a public release label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
added to release notes PR and/or issue has been added to release notes for a public release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade wind download macro to get data from RE Data explorer
3 participants