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

Spatial curtailment #513

Merged
merged 24 commits into from
Feb 14, 2025
Merged

Spatial curtailment #513

merged 24 commits into from
Feb 14, 2025

Conversation

ppinchuk
Copy link
Collaborator

@ppinchuk ppinchuk commented Feb 13, 2025

Refactor curtailment to allow spatially-explicit curtailment options via project points input. The new curtailment functions very similar to the SAM config input now.

Unfortunately this minorly breaks the existing curtailment specification method. Namely, users could previously input the curtailment config directly like so:

"curtailment":  {
    "dawn_dusk": "nautical",
    "months": [4, 5, 6, 7],
    "probability": 1,
    "wind_speed": 10.0,
}

In the updated version, users will have to assign the configuration a name, like so:

"curtailment":  {
    "main_curtailment": {
        "dawn_dusk": "nautical",
        "months": [4, 5, 6, 7],
        "probability": 1,
        "wind_speed": 10.0,
    }
}

The latter allows specifying multiple curtailment configs (which is required to perform spatially-explicit curtailment:

"curtailment":  {
    "main_curtailment": {
        "dawn_dusk": "nautical",
        "months": [4, 5, 6, 7],
        "probability": 1,
        "wind_speed": 10.0,
    },
    "other_curtailment": "/path/to/other/curtailment.json"
}

@ppinchuk ppinchuk added breaking Breaks something in the API or config refactor Code refactor or update enhancement Update to logic or general code improvements topic-generation Issues/pull requests related to generation calculations labels Feb 13, 2025
@ppinchuk ppinchuk self-assigned this Feb 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 13, 2025

Codecov Report

Attention: Patch coverage is 90.60403% with 14 lines in your changes missing coverage. Please review.

Project coverage is 87.64%. Comparing base (7dd83c5) to head (14a0f11).

Files with missing lines Patch % Lines
reV/config/project_points.py 75.00% 12 Missing ⚠️
reV/utilities/curtailment.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #513      +/-   ##
==========================================
+ Coverage   87.57%   87.64%   +0.06%     
==========================================
  Files         122      122              
  Lines       18234    18369     +135     
==========================================
+ Hits        15969    16099     +130     
- Misses       2265     2270       +5     
Flag Coverage Δ
unittests 87.64% <90.60%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ppinchuk
Copy link
Collaborator Author

This PR also addresses #515

@ppinchuk ppinchuk linked an issue Feb 13, 2025 that may be closed by this pull request
@ppinchuk ppinchuk marked this pull request as ready for review February 13, 2025 21:50
@ppinchuk ppinchuk merged commit 7400934 into main Feb 14, 2025
14 checks passed
@ppinchuk ppinchuk deleted the pp/spatial_curtailment branch February 14, 2025 00:34
github-actions bot pushed a commit that referenced this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaks something in the API or config enhancement Update to logic or general code improvements refactor Code refactor or update topic-generation Issues/pull requests related to generation calculations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update resource fpath documentation
2 participants