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

URDBv7_to_ElectricityRates - flatdemandmonths conversion error #128

Closed
relativityboy opened this issue Dec 3, 2022 · 2 comments · Fixed by #126
Closed

URDBv7_to_ElectricityRates - flatdemandmonths conversion error #128

relativityboy opened this issue Dec 3, 2022 · 2 comments · Fixed by #126
Assignees

Comments

@relativityboy
Copy link

relativityboy commented Dec 3, 2022

It looks like the flatdemandmonths -> ur_dc_flat_mat converter works on accident.

The variable flat_demand derived from flatdemandmonths references periods, not tiers. Unfortunately the converter swaps the concept of tiers for periods in this line and accumulates a series of tiers, but calls them periods on the same line.

If there it more than one tier, it then emits an incorrect error message stating that it does not support more than one period per month. flat demand rate structure does not support multiple periods per month

I wonder if ssc might support more than one tier per month if given a correct data-structure.

Regardless - Variable names and error messages should be corrected.

@brtietz
Copy link
Collaborator

brtietz commented Dec 5, 2022

Thanks for filing! We'll get this fixed in time for the next PySAM release. I was planning to test with https://apps.openei.org/USURDB/rate/view/539f6a23ec4f024411ec8beb#2__Demand, unless there's another rate you'd prefer?

@brtietz brtietz self-assigned this Dec 5, 2022
@brtietz brtietz linked a pull request Dec 5, 2022 that will close this issue
@relativityboy
Copy link
Author

That looks good. If the tests pass, I'd close it. :)

dguittet pushed a commit that referenced this issue Dec 10, 2022
* Add resourcetools processing for urdbv8, update examples. currently fails on ur_yearzero_usage_peaks

* Add new loadtools function to convert hourly data into monthly peaks

* Mark urdb version as depricated. Move urdbv8 to new utility rate tools library. Update examples and tests

* Fix #128 - correctly apply urdb flatdemandmonths to determine tiers
dguittet added a commit that referenced this issue Dec 10, 2022
* files for pysam 2.2.4

* update build_manylinux.sh

* update tests and conda build

* update SAM_api files

* closes #89 certifi certificates in fetchresource

* fixes #94

* start v 2.3.0

* fix #69

* changes from 2021.12.2 release

* add VersionChanges.rst

* add version_differ.py

* add more release info

* update version_differ.py doc str

* correct version_differ.py with PySSC

* add python 3.10

* fix getting env variables during build and remove pandas dependency

* fix test_ResouceTools.py

* switch to manylinux2010 for Python 3.10 support

* update pysam files

* update PySAM files

* Update docs for Version 3.0.1

* close #109

* remove stubs package dependency

* removal of stubs package

* Apple Silicon and Intel Wheel

pip3 install --extra-index-url https://test.pypi.org/simple/ NREL_PySAM

* update files and test

* Add utility rate forecast example for new stateful cmod (#119)

* Add utility rate forecast example for new stateful cmod

* Update failing test_Reopt_sizing.py

Add sys.SolarResource.wf_use_albedo = 0

* some stubs changes from develop. Additional documentation for utility rate forecast script

* Additional subs files from comd_utilityrateforcast sam branches and develop

* Correct energy charge schedule fields to match number of periods in energy charge fields

* add tests and improve comments in example

Co-authored-by: sjanzou <sjanzou@gmail.com>

* PySAM documentation revisions

* update setup and tests

* update files

* update versions.rst

* update rsts

* updates for v3.0.2

* update build_manylinux.sh

* update comments

* Modifications to PySSC to handle the conventions form ssc PR 907, plus module and docs updates to match

* Pysam 116 urdb version 8 (#126)

* Add resourcetools processing for urdbv8, update examples. currently fails on ur_yearzero_usage_peaks

* Add new loadtools function to convert hourly data into monthly peaks

* Mark urdb version as depricated. Move urdbv8 to new utility rate tools library. Update examples and tests

* Fix #128 - correctly apply urdb flatdemandmonths to determine tiers

* pysam v4.0.0

* update test

* add error check to build_win.bat

* fix docs

* update cmake version

Co-authored-by: sjanzou <sjanzou@gmail.com>
Co-authored-by: sjanzou <steven@janzouconsulting.com>
Co-authored-by: Brian Mirletz <brian.mirletz@nrel.gov>
Co-authored-by: Paul Gilman <cpaulgilman@gmail.com>
dguittet added a commit that referenced this issue Feb 26, 2023
* files for pysam 2.2.4

* update build_manylinux.sh

* update tests and conda build

* update SAM_api files

* closes #89 certifi certificates in fetchresource

* fixes #94

* start v 2.3.0

* fix #69

* changes from 2021.12.2 release

* add VersionChanges.rst

* add version_differ.py

* add more release info

* update version_differ.py doc str

* correct version_differ.py with PySSC

* add python 3.10

* fix getting env variables during build and remove pandas dependency

* fix test_ResouceTools.py

* switch to manylinux2010 for Python 3.10 support

* update pysam files

* update PySAM files

* Update docs for Version 3.0.1

* close #109

* remove stubs package dependency

* removal of stubs package

* Apple Silicon and Intel Wheel

pip3 install --extra-index-url https://test.pypi.org/simple/ NREL_PySAM

* update files and test

* Add utility rate forecast example for new stateful cmod (#119)

* Add utility rate forecast example for new stateful cmod

* Update failing test_Reopt_sizing.py

Add sys.SolarResource.wf_use_albedo = 0

* some stubs changes from develop. Additional documentation for utility rate forecast script

* Additional subs files from comd_utilityrateforcast sam branches and develop

* Correct energy charge schedule fields to match number of periods in energy charge fields

* add tests and improve comments in example

Co-authored-by: sjanzou <sjanzou@gmail.com>

* PySAM documentation revisions

* update setup and tests

* update files

* update versions.rst

* update rsts

* updates for v3.0.2

* update build_manylinux.sh

* update comments

* Modifications to PySSC to handle the conventions form ssc PR 907, plus module and docs updates to match

* Pysam 116 urdb version 8 (#126)

* Add resourcetools processing for urdbv8, update examples. currently fails on ur_yearzero_usage_peaks

* Add new loadtools function to convert hourly data into monthly peaks

* Mark urdb version as depricated. Move urdbv8 to new utility rate tools library. Update examples and tests

* Fix #128 - correctly apply urdb flatdemandmonths to determine tiers

* pysam v4.0.0

* update test

* add error check to build_win.bat

* fix docs

* update cmake version

* update platform tag for manylinux2014

* update files

* Fix wind resource download in ResourceTools.py

Now that Windpower supports WIND Toolkit CSV file format, no need to convert to SRW.

* update build files

---------

Co-authored-by: sjanzou <sjanzou@gmail.com>
Co-authored-by: sjanzou <steven@janzouconsulting.com>
Co-authored-by: Brian Mirletz <brian.mirletz@nrel.gov>
Co-authored-by: Paul Gilman <cpaulgilman@gmail.com>
dguittet added a commit that referenced this issue Feb 26, 2023
* files for pysam 2.2.4

* update build_manylinux.sh

* update tests and conda build

* update SAM_api files

* closes #89 certifi certificates in fetchresource

* fixes #94

* start v 2.3.0

* fix #69

* changes from 2021.12.2 release

* add VersionChanges.rst

* add version_differ.py

* add more release info

* update version_differ.py doc str

* correct version_differ.py with PySSC

* add python 3.10

* fix getting env variables during build and remove pandas dependency

* fix test_ResouceTools.py

* switch to manylinux2010 for Python 3.10 support

* update pysam files

* update PySAM files

* Update docs for Version 3.0.1

* close #109

* remove stubs package dependency

* removal of stubs package

* Apple Silicon and Intel Wheel

pip3 install --extra-index-url https://test.pypi.org/simple/ NREL_PySAM

* update files and test

* Add utility rate forecast example for new stateful cmod (#119)

* Add utility rate forecast example for new stateful cmod

* Update failing test_Reopt_sizing.py

Add sys.SolarResource.wf_use_albedo = 0

* some stubs changes from develop. Additional documentation for utility rate forecast script

* Additional subs files from comd_utilityrateforcast sam branches and develop

* Correct energy charge schedule fields to match number of periods in energy charge fields

* add tests and improve comments in example

Co-authored-by: sjanzou <sjanzou@gmail.com>

* PySAM documentation revisions

* update setup and tests

* update files

* update versions.rst

* update rsts

* updates for v3.0.2

* update build_manylinux.sh

* update comments

* Modifications to PySSC to handle the conventions form ssc PR 907, plus module and docs updates to match

* Pysam 116 urdb version 8 (#126)

* Add resourcetools processing for urdbv8, update examples. currently fails on ur_yearzero_usage_peaks

* Add new loadtools function to convert hourly data into monthly peaks

* Mark urdb version as depricated. Move urdbv8 to new utility rate tools library. Update examples and tests

* Fix #128 - correctly apply urdb flatdemandmonths to determine tiers

* pysam v4.0.0

* update test

* add error check to build_win.bat

* fix docs

* update cmake version

* update platform tag for manylinux2014

* update files

* Fix wind resource download in ResourceTools.py

Now that Windpower supports WIND Toolkit CSV file format, no need to convert to SRW.

* Update failing test and build arm64 and aarch64 4.0.1

* twine works for arm64 wheels but manylinux1_aarch64 not supported

anaconda upload fails with 
Extracting conda package attributes for upload
Creating package "nrel-pysam"
Creating release "4.1.0"
[ERROR] ('"nrel-pysam" could not be found', 404)

---------

Co-authored-by: dguittet <dguittet@nrel.gov>
Co-authored-by: Brian Mirletz <brian.mirletz@nrel.gov>
Co-authored-by: Paul Gilman <cpaulgilman@gmail.com>
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 a pull request may close this issue.

3 participants