Wind Resource for Alaska (API)#

Wind resource data can downloaded for Alaska from the NREL Developer Network hosted Wind Integration National Dataset (WIND) Toolkit dataset Wind Toolkit Data - Alaska V1.0.0. Using this functionality requires an NREL API key.

Wind resource data for Alaska can only be downloaded for wind resource years 2018-2020 and is only downloaded if the wind_resource_region input to SiteInfo is set to “ak”. For example:

site:
    wind_resource_region: "ak"
class hopp.simulation.technologies.resource.alaska_wind.AlaskaWindData(lat, lon, year, hub_height_meters, path_resource=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/hopp/envs/latest/lib/python3.11/site-packages/hopp/simulation/resource_files'), filename=None, use_api=False, resource_data=None, file_resource_heights=None, allowed_hub_height_meters=[10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 250, 300, 500, 1000])#

Bases: Resource

Parameters:
  • lat (float)

  • lon (float)

  • year (int)

  • hub_height_meters (float)

  • path_resource (str | Path | None)

  • filename (str | Path | None)

  • use_api (bool | None)

  • resource_data (dict | None)

  • file_resource_heights (dict)

  • allowed_hub_height_meters (list[int])

lat: float#

latitude corresponding to location for wind resource data

lon: float#

longitude corresponding to location for wind resource data

year: int#

year for resource data. must be between 2018 and 2020

hub_height_meters: float#

the hub-height for wind resource data (meters)

path_resource: str | Path | None#

filepath to resource_files directory. Defaults to ROOT_DIR/”simulation”/”resource_files”.

filename: str | Path | None#

file path of resource file to load or download

use_api: bool | None#

Make an API call even if there’s an existing file. Defaults to False.

resource_data: dict | None#

dictionary of preloaded and formatted wind resource data. Defaults to None.

file_resource_heights: dict#

dictionary of heights and filenames to download from Wind Toolkit

allowed_hub_height_meters: list[int]#

list of heights that wind resource data is available for downloading (meters)

calculate_heights_to_download()#

Given the system hub height, and the available hubheights from WindToolkit, determine which heights to download to bracket the hub height

update_height(hub_height_meters)#

Update hub-height and corresponding attributes. Also updates file_resource_heights and filename.

Parameters:

hub_height_meters (float) – hub-height for wind resource data (meters)

download_resource()#

Download resource for given lat/lon

format_data()#

Format as ‘wind_resource_data’ dictionary for use in PySAM.

property data#

Get data as dictionary formatted for SAM

__init__(lat, lon, year, hub_height_meters, path_resource=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/hopp/envs/latest/lib/python3.11/site-packages/hopp/simulation/resource_files'), filename=None, use_api=False, resource_data=None, file_resource_heights=None, allowed_hub_height_meters=[10, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 250, 300, 500, 1000])#

Method generated by attrs for class AlaskaWindData.

Parameters:
  • lat (float)

  • lon (float)

  • year (int)

  • hub_height_meters (float)

  • path_resource (str | Path | None)

  • filename (str | Path | None)

  • use_api (bool | None)

  • resource_data (dict | None)

  • file_resource_heights (dict)

  • allowed_hub_height_meters (list[int])

Return type:

None

static call_api(url, filename)#
Parameters:
  • url (str) – The API endpoint to return data from

  • filename (str) – The filename where data should be written

Returns:

True if downloaded file successfully, False if encountered error in downloading