bifacial_radiance.RadianceObj.readWeatherData#

RadianceObj.readWeatherData(metadata, metdata, starttime=None, endtime=None, coerce_year=None, label='center', tz_convert_val=None)[source]#

Intermediate function to read in metadata and metdata objects from readWeatherFile and export a MetObj

Parameters:
  • metadata (dict) – Dictionary with metadata stats. keys required: ‘lat’, ‘lon’, ‘altitude’, ‘TZ’

  • metdata (Pandas DataFrame) – Dataframe with meteo timeseries. Index needs to be datetimelike and TZ-aware. columns required: ‘DNI’, ‘DHI’,’GHI’, ‘Alb’

  • starttime (str, optional) – Limited start time option in ‘YYYY-mm-dd_HHMM’ or ‘mm_dd_HH’ format

  • endtime (str, optional) – Limited end time option in ‘YYYY-mm-dd_HHMM’ or ‘mm_dd_HH’ format

  • label (str) – ‘left’, ‘right’, or ‘center’. For data that is averaged, defines if the timestamp refers to the left edge, the right edge, or the center of the averaging interval, for purposes of calculating sunposition. For example, TMY3 data is right-labeled, so 11 AM data represents data from 10 to 11, and sun position is calculated at 10:30 AM. Currently SAM and PVSyst use left-labeled interval data and NSRDB uses centered.

  • coerce_year (int) – Year to coerce weather data to in YYYY format, ie 2021. If more than one year of data in the weather file, year is NOT coerced.

  • tz_convert_val (int) – Convert timezone to this fixed value, following ISO standard (negative values indicating West of UTC.)