Solar Resource (NSRDB Dataset on NREL HPC)#

If enabled, solar resource data can be loaded from the NREL HPC (Kestrel) hosted National Solar Radiation Database (NSRDB) dataset. This functionality leverages the NREL REsource eXtraction (rex) tool. Information on NREL HPC file systems and datasets can be found here.

class hopp.simulation.technologies.resource.nsrdb_data.HPCSolarData(lat, lon, year, nsrdb_source_path='', filepath='')#

Bases: Resource

Class to manage Solar Resource data from NSRDB Datasets.

Parameters:
  • lat (float)

  • lon (float)

  • year (int)

  • nsrdb_source_path (str | Path)

  • filepath (str)

nsrdb_file#

(str) path of file that resource data is pulled from.

site_gid#

(int) id for NSRDB location that resource data was pulled from.

nsrdb_latitude#

(float) latitude of NSRDB location corresponding to site_gid.

nsrdb_longitude#

(float) longitude of NSRDB location corresponding to site_gid.

__init__(lat, lon, year, nsrdb_source_path='', filepath='')#

Class to pull solar resource data from NSRDB datasets hosted on the HPC

Parameters:
  • lat (float) – latitude corresponding to location for solar resource data

  • lon (float) – longitude corresponding to location for solar resource data

  • year (int) – year for resource data. must be between 1998 and 2022

  • nsrdb_source_path (Union[str,Path], optional) – directory where NSRDB data is hosted on HPC. Defaults to “”.

  • filepath (str, optional) – filepath to NSRDB h5 file on HPC. Defaults to “”. - should be formatted as: /path/to/file/name_of_file.h5

Raises:
  • ValueError – if year is not between 1998 and 2022 (inclusive)

  • FileNotFoundError – if nsrdb_file is not valid filepath

download_resource()#

load NSRDB h5 file using rex and get solar resource data for location specified by (self.lat, self.lon)

filename#

filepath of resource data file, defaults to None

format_data()#

Reads data from file and formats it for use in SAM

property data#

Get data as dictionary formatted for SAM