Skip to content

Wind Resource Model: HRRR MET Toolkit - #837

Open
elenya-grant wants to merge 17 commits into
NatLabRockies:developfrom
elenya-grant:wind/hrrr_met
Open

Wind Resource Model: HRRR MET Toolkit#837
elenya-grant wants to merge 17 commits into
NatLabRockies:developfrom
elenya-grant:wind/hrrr_met

Conversation

@elenya-grant

@elenya-grant elenya-grant commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Wind Resource Model: HRRR MET Toolkit

Added wind resource model that uses the NLR Developer API call to the HRRR MET Toolkit. This wind resource dataset has resource years from 2015-2025 and covers the continental US. Adding in this model prompted some updates to the existing wind toolkit model. It may look like theres more changes than there actually is! Here's what I did:

  • First, I copied the file h2integrate/resource/wind/nlr_developer_wtk_api.py and named the copied version h2integrate/resource/wind/nlr_developer_wtk_api_models.py. This new file is intended to host the wind resource models that pull from the NLR Developer API.
  • Then, I renamed h2integrate/resource/wind/nlr_developer_wtk_api.py to h2integrate/resource/wind/nlr_developer_wtk_api_base.py. This file is going to host the baseclass for the models in nlr_developer_wtk_api_models.py
    • Then, renamed WTKNLRDeveloperAPIWindResource to NLRDeveloperAPIWindResourceBase
    • Removed WTKNLRDeveloperAPIConfig (because a copy of it is in nlr_developer_wtk_api_models.py)
    • Moved super().setup() to be called at the top of the setup method. Only minor changes were made to the methods within this class
  • Finally, in nlr_developer_wtk_api_models.py:
    • Updated the copy of WTKNLRDeveloperAPIWindResource to inherit the NLRDeveloperAPIWindResourceBase
    • Added a config class and performance model for the HRRR MET wind resource model.

All of this is to say that, despite what the file comparison may show you, WTKNLRDeveloperAPIConfig did not change (only changed files). Only small changes were done to convert what was previously WTKNLRDeveloperAPIWindResource into NLRDeveloperAPIWindResourceBase (which is visible in the file diff for h2integrate/resource/wind/nlr_developer_wtk_api_base.py)

Section 1: Type of Contribution

  • Feature Enhancement
    • Framework
    • New Model
    • Updated Model
    • Tools/Utilities
    • Other (please describe):
  • Bug Fix
  • Documentation Update
  • CI Changes
  • Other (please describe):

Section 2: Draft PR Checklist

  • Open draft PR
  • Describe the feature that will be added
  • Fill out TODO list steps
  • Describe requested feedback from reviewers on draft PR
  • Complete Section 8: New Model Checklist (if applicable)

TODO:

  • Update doc page for wind resource models
  • Add integration test with either PySAM wind or FLORIS
  • update CHANGELOG.md
  • update class_hierarchy.html

Type of Reviewer Feedback Requested (on Draft PR)

Structural feedback:

Implementation feedback:

  • I'm imagining that folks will have thoughts on the class and file naming.

Other feedback:

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature, bug fix, etc.
  • Added tests for new functionality or bug fixes
  • Tests pass (If not, and this is expected, please elaborate in the Section 6: Test Results)
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • [-] Examples have been updated (if applicable)
  • CHANGELOG.md
    • At least one complete sentence has been provided to describe the changes made in this PR
    • After the above, a hyperlink has been provided to the PR using the following format:
      "A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
      XYZ should be replaced with the actual number.

Section 4: Related Issues

Section 5: Impacted Areas of the Software

Section 5.1: New Files

  • resource_files/wind/39.22629_-82.938_2011_wtk_v2_60min_utc_tz.csv: new resource file
  • h2integrate/resource/wind/test/test_wind_model_integration.py: new test file for very simple testing that ensures that wind resource models are compatible with wind performance models.

Section 5.2: Modified Files

This is mostly covered in Section 1
Other changes were:

  • some fixes to the solar resource documentation

Section 6: Additional Supporting Information

Section 7: Test Results, if applicable

h2integrate/resource/wind/test/test_nlr_developer_wtk_api.py::test_wind_resource_loaded_from_default_dir - I added another case to test the new wind resource model which required some minor changes to the general check-logic. This mainly has to with the "minute" thats used in the resource models (WTKNLRDeveloperAPIWindResource has minutes of 30, but HRRRMETToolkitWindAPI has minutes of 0).

Section 8 (Optional): New Model Checklist

  • Model Structure:
    • Follows established naming conventions outlined in docs/developer_guide/coding_guidelines.md
    • Used attrs class to define the Config to load in attributes for the model
      • If applicable: inherit from BaseConfig or CostModelBaseConfig
    • Added: initialize() method, setup() method, compute() method
      • [-] If applicable: inherit from CostModelBaseClass
  • Integration: Model has been properly integrated into H2Integrate
    • Add the new model to the appropriate __init__.py file to ensure it is properly imported and used in supported_models.py
    • Added to supported_models.py
    • If a new commodity_type is added, update create_financial_model in h2integrate_model.py
  • Tests: Unit tests have been added for the new model
    • Pytest-style unit tests
    • Unit tests are in a "test" folder within the folder a new model was added to
    • If applicable add integration tests
  • [-] Example: If applicable, a working example demonstrating the new model has been created
    • [-] Input file comments
    • [-] Run file comments
    • [-] Example has been tested and runs successfully in test_all_examples.py
  • Documentation:
    • Write docstrings using the Google style
    • Model added to the main models list in docs/user_guide/model_overview.md
      • Model documentation page added to the appropriate docs/ section
      • <model_name>.md is added to the _toc.yml
    • Run generate_class_hierarchy.py to update the class hierarchy diagram in docs/developer_guide/class_structure.md

@elenya-grant
elenya-grant requested a review from kbrunik August 12, 2026 23:00
@elenya-grant elenya-grant added the ready for review This PR is ready for input from folks label Aug 13, 2026
@elenya-grant
elenya-grant marked this pull request as ready for review August 13, 2026 20:19
@elenya-grant
elenya-grant requested review from kbrunik and removed request for kbrunik August 13, 2026 21:00

@kbrunik kbrunik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yay! Thanks for this! One small question about the docs but otherwise this looks great, no notes :)

- **resource heights** from 10 to 500 meters.
- **time interval** of 60 minutes.

### Available Data

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we want to just refer people to the developer website instead of tracking what's available via each API? It seems like something that could go out of date pretty easily without us being able to catch it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think it's nice to have them side-by-side. I guess that I like it in our doc page for now - and I'm not too concerned about stuff going out of date (data hasn't changed in a long time, biggest change to the developer network recently was the url changes). The links to the developer website are included in this doc page! Idk - I guess maybe we remove it in the future if we want? But I like it here for now?

@kbrunik
kbrunik enabled auto-merge (squash) August 14, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR is ready for input from folks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants