pvlib.iotools.get_pvgis_tmy¶
-
pvlib.iotools.get_pvgis_tmy(lat, lon, outputformat='json', usehorizon=True, userhorizon=None, startyear=None, endyear=None, url='https://re.jrc.ec.europa.eu/api/', timeout=30)[source]¶ Get TMY data from PVGIS. For more information see the PVGIS 1 TMY tool documentation 2.
- Parameters
lat (float) – Latitude in degrees north
lon (float) – Longitude in dgrees east
outputformat (str, default 'json') – Must be in
['csv', 'basic', 'epw', 'json']. See PVGIS TMY tool documentation 2 for more info.usehorizon (bool, default True) – include effects of horizon
userhorizon (list of float, default None) – optional user specified elevation of horizon in degrees, at equally spaced azimuth clockwise from north, only valid if usehorizon is true, if usehorizon is true but userhorizon is None then PVGIS will calculate the horizon 3
startyear (int, default None) – first year to calculate TMY
endyear (int, default None) – last year to calculate TMY, must be at least 10 years from first year
url (str, default
pvlib.iotools.pvgis.URL) – base url of PVGIS API, appendtmyto get TMY endpointtimeout (int, default 30) – time in seconds to wait for server response before timeout
- Returns
data (pandas.DataFrame) – the weather data
months_selected (list) – TMY year for each month,
Nonefor basic and EPWinputs (dict) – the inputs,
Nonefor basic and EPWmeta (list or dict) – meta data,
Nonefor basic
- Raises
requests.HTTPError – if the request response status is
HTTP/1.1 400 BAD REQUEST, then the error message in the response will be raised as an exception, otherwise raise whateverHTTP/1.1error occurred
See also
References