Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ classifiers = [
requires-python = ">=3.10,<3.13"
dependencies = [
"windIO @ git+https://github.com/EUFlow/windIO.git",
"xarray>=2022.0.0,<2025",
"scipy",
"pyyaml",
"floris @ git+https://github.com/lejeunemax/floris.git",
"wayve @ git+https://gitlab.kuleuven.be/TFSO-software/wayve",
"numpy>=1.22,<3.0",
"xarray",
"mpmath",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion wifa/main_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def run_api(yaml_input):
# validate input
validate_yaml(yaml_input, windIO.__path__[0] + "/plant/wind_energy_system.yaml")
validate_yaml(yaml_input, "plant/wind_energy_system")

# get number of turbines
if isinstance(yaml_input, dict):
Expand Down
4 changes: 4 additions & 0 deletions wifa/pywake_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def dict_to_site(resource_dict):
if name in resource_ds:
resource_ds = resource_ds.rename({name: rename_map[name]})

if "time" in resource_ds.dims:
# Convert time coordinate to integer indices for GridInterpolator compatibility
# (string or datetime time coords cannot be interpolated numerically)
resource_ds = resource_ds.assign_coords(time=np.arange(len(resource_ds.time)))
if "P" not in resource_ds and "time" in resource_ds.dims:
n_time = len(resource_ds.time)
# Create uniform probability array (1/N)
Expand Down
Loading