-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Add wind speed height correction for EPW data handling #748
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
base: master
Are you sure you want to change the base?
Conversation
|
🤖 I've automatically formatted the code in this PR using:
Please pull the latest changes before making further edits. |
Addresses #149 - wind speed discrepancies when using EPW files as SUEWS forcing Changes: - Add correct_wind_height() utility for logarithmic wind profile corrections - Enhance read_epw() with optional wind_height and z0m parameters - Extend convert_UMEPf2epw() with height correction capabilities - Add comprehensive test coverage - Update documentation and CHANGELOG Technical details: - Uses logarithmic wind profile: U(z)/U(z_ref) = ln((z+z0m)/z0m) / ln((z_ref+z0m)/z0m) - EPW standard: wind at 10m, T/RH at 2m AGL - Backward compatible: all new parameters are optional - Consistent with existing ERA5 height correction approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: sunt05 <1802656+sunt05@users.noreply.github.com>
|
🤖 I've automatically formatted the code in this PR using:
Please pull the latest changes before making further edits. |
|
@claude pull changes from master into this branch |
|
Claude finished @sunt05's task —— View job Successfully pulled changes from master into branch ✅I've successfully brought the gh149 branch up to date with the key changes from master. Todo List:
What was accomplished:Files updated from master:
Infrastructure sync:
Summary:The branch is now synced with the essential changes from master. The Claude workspace infrastructure is in place with updated documentation for environment setup and testing procedures. The original wind speed height correction feature remains intact. The branch should now build and test correctly with the updated infrastructure. To complete the setup, you can run: uv venv && source .venv/bin/activate && make dev && make test |
Co-authored-by: Ting Sun <sunt05@users.noreply.github.com>
- Update .claude/reference/quick-start.md with latest setup instructions - Update .claude/reference/testing-guide.md with benchmark test details - Brings branch in sync with Claude workspace infrastructure from master Co-authored-by: Ting Sun <sunt05@users.noreply.github.com>
PR: Add wind speed height correction for EPW data handling
Title:
feat: Add wind speed height correction for EPW data handlingBase branch:
masterLabels:
3-P2,1-bug,4-ready,2-infra:inputSummary
Addresses #149 - wind speed discrepancies when using EPW (EnergyPlus Weather) files as forcing data for SUEWS/SuPy.
Problem
EPW files follow standard meteorological measurement heights:
However, SUEWS forcing can be configured at any height. Previously:
Solution
1. New Utility Function:
correct_wind_height()Location:
src/supy/util/_atm.pyFeatures:
U(z) / U(z_ref) = ln((z + z0m) / z0m) / ln((z_ref + z0m) / z0m)2. Enhanced
read_epw()FunctionNew optional parameters:
wind_height: Target height (m) to correct wind speed toz0m: Roughness length for momentum (default 0.1 m)Example usage:
3. Enhanced
convert_UMEPf2epw()FunctionNew optional parameters:
wind_height_input: Height (m) of input UMEP wind datawind_height_output: Target height for EPW output (default 10 m)z0m: Roughness length (default 0.1 m)Example usage:
Testing
Comprehensive test suite added (
test/core/test_util_atm.py::TestWindHeightCorrection):Technical Details
Logarithmic Wind Profile
Under neutral atmospheric stability:
Where:
U(z): wind speed at height zu*: friction velocityk: von Kármán constant (0.4)d: displacement height (assumed 0)z0m: roughness length for momentumAssumptions & Simplifications
_era5.py:1035)Future Enhancements (if needed)
Backward Compatibility
✅ Fully backward compatible:
None)Code References
_atm.py:296-346_tmy.py:314-380_UMEP2epw.py:21-81, 218-227test/core/test_util_atm.py:256-375_era5.py:1035(ERA5 wind correction)Documentation
Files Changed
Checklist
Related
Closes #149
🤖 Generated with Claude Code