Skip to content

Feature/issue 217 snow depth - #342

Open
Raakshass wants to merge 1 commit into
openclimatefix:mainfrom
Raakshass:feature/issue-217-snow-depth
Open

Feature/issue 217 snow depth#342
Raakshass wants to merge 1 commit into
openclimatefix:mainfrom
Raakshass:feature/issue-217-snow-depth

Conversation

@Raakshass

Copy link
Copy Markdown
Contributor

Pull Request

Description

Adds snow depth as a predictor feature to improve solar forecast accuracy during winter conditions.

Snow on PV panels reduces output through:

  • Reflection: Snow reflects incoming radiation
  • Physical coverage: Snow blocks panel surface
  • Albedo effect: Ground snow can slightly increase diffuse radiation (positive effect)

Changes Made:

  1. open_meteo.py: Added snow_depth to Open-Meteo API variables
  2. v3_lightgbm.py: Added _add_snow_features() method with:
    • snow_depth: Raw value in meters (NaN → 0)
    • has_snow: Binary indicator (0/1)
    • snow_impact: Normalized factor (0-1, capped at 0.5m)
  3. test_v3_lightgbm.py: Added 7 unit tests for snow feature engineering

The implementation is backward compatible - defaults to 0 if snow data is unavailable.

Fixes #217

How Has This Been Tested?

  • Yes - Python syntax validation (py_compile) passes for all 3 modified files
  • Yes - 7 new unit tests in TestSnowFeatures class cover:
    • Snow features added with data
    • Values with/without snow
    • Impact capped at 1.0 for heavy snow
    • NaN handling
    • Backward compatibility when snow_depth missing

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@Raakshass
Raakshass force-pushed the feature/issue-217-snow-depth branch from 576e187 to 85113d5 Compare February 7, 2026 21:30
…pth to Open-Meteo API weather variables - Add _add_snow_features method with snow_depth has_snow snow_impact - Add 7 unit tests for snow feature engineering
@Raakshass
Raakshass force-pushed the feature/issue-217-snow-depth branch from 0c74709 to 59e6453 Compare February 16, 2026 19:11
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 this pull request may close these issues.

Snow depth as predictor

1 participant