Skip to content

Commit

Permalink
smooth
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Nov 26, 2024
1 parent 65f0296 commit 4c7b3d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 4 additions & 2 deletions india_forecast_app/models/all_models.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,28 @@ models:
version: ae07c15de064e1d03cf4bc02618b65c6d5b17e8e
client: ruvnl
asset_type: wind
smooth_blocks: 4
- name: windnet_india_mo
type: pvnet
id: openclimatefix/windnet_india
version: 546baded3d4216736d8ee8d6798d47235bd72b08
client: ruvnl
asset_type: wind
smooth_blocks: 5
smooth_blocks: 7
- name: windnet_india_mo_v2
type: pvnet
id: openclimatefix/windnet_india
version: 165267d34500cf0c881ed70d9318421f4e0d10f1
client: ruvnl
asset_type: wind
smooth_blocks: 4
- name: windnet_india_mo_v3
type: pvnet
id: openclimatefix/windnet_india
version: 990bed9ad1dbb10515f830c181609b10e72c975e
client: ruvnl
asset_type: wind
smooth_blocks: 5
smooth_blocks: 7
# RU client solar
- name: pvnet_india
type: pvnet
Expand Down
8 changes: 0 additions & 8 deletions india_forecast_app/models/pvnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@ def predict(self, site_id: str, timestamp: dt.datetime):
) * smooth_values[final_gen_index + idx]
log.debug(f"New values are {values_df['forecast_power_kw']}")

if self.asset_type == "wind":
# Smooth with a 1 hour rolling window
# Only smooth the wind else we introduce too much of a lag in the solar
# going up and down throughout the day
values_df["forecast_power_kw"] = (
values_df["forecast_power_kw"].rolling(4, min_periods=1).mean().astype(int)
)

if self.smooth_blocks:
log.info(f"Smoothing the forecast with {self.smooth_blocks} blocks")
values_df["forecast_power_kw"] = (
Expand Down

0 comments on commit 4c7b3d2

Please sign in to comment.