Wave Resource#
NOTE: Downloading wave resource data is not yet enabled but can still be loaded from existing data files.
- class hopp.simulation.technologies.resource.wave_resource.WaveResource(lat, lon, year, path_resource='', filepath='', **kwargs)#
Bases:
ResourceClass to manage Wave Resource data.
This class loads, processes, and formats wave energy resource data, either from a file or a provided dataset, for compatibility with PySAM’s wave energy models.
- Parameters:
lat (float)
lon (float)
year (int)
path_resource (str)
filepath (str)
- __init__(lat, lon, year, path_resource='', filepath='', **kwargs)#
Initializes the WaveResource object.
- Parameters:
lat (float) – Latitude of the resource location.
lon (float) – Longitude of the resource location.
year (int) – Year of the resource data.
path_resource (str, optional) – Directory where downloaded files are saved. Defaults to “”.
filepath (str, optional) – File path of the resource file to load. Defaults to “”.
**kwargs – Additional keyword arguments.
Notes
- The wave resource data should be in the format:
Rows 1 and 2: Header rows with location info.
- Row 3: Column headings for time-series data
(Year, Month, Day, Hour, Minute, wave height, wave period).
- Rows 4+: Data values:
wave height (significant wave height) in meters.
wave period (energy period) in seconds.
Example file: hopp/simulation/resource_files/wave/Wave_resource_timeseries.csv
- filename#
filepath of resource data file, defaults to None
- download_resource()#
Placeholder for downloading wave resource data.
- Raises:
NotImplementedError – Currently, downloading functionality is not implemented.
Notes
Future task: implement resource downloads using [MHKit](https://mhkit-software.github.io/MHKiT/).
- format_data()#
Formats wave resource data as a dictionary for PySAM.
- Raises:
FileNotFoundError – If the specified resource file does not exist.
- property data#
Get data as dictionary formatted for SAM