Tidal Resource#

NOTE: Downloading tidal resource data is not yet enabled but can still be loaded from existing data files.

class hopp.simulation.technologies.resource.tidal_resource.TidalResource(lat, lon, year, path_resource='', filepath='', **kwargs)#

Bases: Resource

Class to manage Tidal Resource data.

This class loads, processes, and formats tidal energy resource data, either from a file or a provided dataset, for compatibility with PySAM’s tidal energy models.

Parameters:
  • lat (float)

  • lon (float)

  • year (int)

  • path_resource (str)

  • filepath (str)

__init__(lat, lon, year, path_resource='', filepath='', **kwargs)#

Initializes the TidalResource 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 tidal 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, Speed).

  • Rows 4+: Data values:

  • Speed (current speed) in meters/second.

Example file:

hopp/simulation/resource_files/tidal/Tidal_resource_timeseries.csv

filename#

filepath of resource data file, defaults to None

download_resource()#

Placeholder for downloading tidal resource data.

Raises:

NotImplementedError – Currently, downloading functionality is not implemented.

format_data()#

Formats tidal 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