Skip to content

circle-based boundaries not currently supported with pywake #26

@bjarketol

Description

@bjarketol

See title.

One benefit of supporting circles would be that the (optional) CRS objects can be added. Circles are the only place you can add a crs in windIO (afaik).

traceback:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[55], [line 4]
       2 with fmc.working_directory(paths.run / "exp1"):  # temporary fix for relative paths
       3     shutil.rmtree("output", ignore_errors=True)
---->  4    wifa.run_api(yaml_file.resolve())

File ~/projects/wifa/wifa/main_api.py:26, in run_api(yaml_input)
      23 model_name = yaml_dat["attributes"]["flow_model"]["name"]
      25 if model_name.lower() == "pywake":
--->  26   pywake_aep = run_pywake(yaml_input)
      28 elif model_name.lower() == "foxes":
      29    foxes_aep = run_foxes(yaml_input)

File ~/projects/wifa/wifa/pywake_api.py:253, in run_pywake(yamlFile, output_dir)
     239 # farm = 'examples/plant/plant_wind_farm/IEA37_case_study_3_wind_farm.yaml'
     240 # with open(farm, "r") as stream:
     241 #    try:
    (...)    250 #    except yaml.YAMLError as exc:
     251 #        print(exc)
     252 resource_dat = system_dat["site"]["energy_resource"]
-->  253 WFXLB = np.min(system_dat["site"]["boundaries"]["polygons"][0]["x"])
     254 WFXUB = np.max(system_dat["site"]["boundaries"]["polygons"][0]["x"])
     255 WFYLB = np.min(system_dat["site"]["boundaries"]["polygons"][0]["y"])

KeyError: 'polygons'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions