Skip to content

Commit

Permalink
Add wind direction to resource kwargs if layout found in any SAM config
Browse files Browse the repository at this point in the history
  • Loading branch information
ppinchuk committed Sep 12, 2024
1 parent f4b0b40 commit d9905b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions reV/SAM/SAM.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ def _make_res_kwargs(
# make precip rate available for curtailment analysis
kwargs["precip_rate"] = True

sam_configs = project_points.sam_inputs.values()
needs_wd = any(_sam_config_contains_turbine_layout(sam_config)
for sam_config in sam_configs)
kwargs["require_wind_dir"] = needs_wd

elif res_handler == GeothermalResource:
args += (project_points.d,)

Expand Down Expand Up @@ -954,3 +959,8 @@ def _add_sys_capacity(sam_inputs):
cap = sam_inputs.get("nameplate")

sam_inputs["system_capacity"] = cap


def _sam_config_contains_turbine_layout(sam_config):
"""Detect wether SAM config contains multiple turbines in layout. """
return len(sam_config.get("wind_farm_xCoordinates", ())) > 1

0 comments on commit d9905b1

Please sign in to comment.