Wind-Farm Case Loader

Loads bundled wind-farm case grids (pickle) together with optional GeoJSON geographic context (development area, exclusions, export cables).

Requires pyflow_acdc[mapping] (shapely) for GeoJSON parsing.

Functions are found in pyflow_acdc.windfarm_loader.

load_case_grid_and_geo(case_name, source_tag='gebco')[source]

Load a bundled wind-farm grid and attach GeoJSON geographic context.

Locates {case_name.lower()}_{source_tag}.pkl.gz (or {case_name.lower()}.pkl.gz) under the packaged example_grids/wind_farm_data tree or PYFLOW_WINDFARM_DATA_DIR. Optionally loads {case_name.lower()}.geojson and attaches polygons/lines to grid (dev_polygon, export_cables, exclusion_zones, soft_exclusion_zones).

Parameters:
  • case_name (str) – Wind-farm case name (resolved to lowercase filenames under wind_farm_data/).

  • source_tag (str, optional) – Pickle filename tag (default "gebco").

Returns:

(grid, res) from create_grid_from_pickle().

Return type:

tuple

Examples

>>> import pyflow_acdc as pyf
>>> grid, res = pyf.windfarm_loader.load_case_grid_and_geo("moray_east")
>>> # Geometry context is attached for folium / array plotting:
>>> # grid.dev_polygon, grid.export_cables, grid.exclusion_zones, ...