|
45 | 45 |
|
46 | 46 | def get_pvgis_hourly(latitude, longitude, start=None, end=None,
|
47 | 47 | raddatabase=None, components=True,
|
48 |
| - surface_tilt=0, surface_azimuth=0, |
| 48 | + surface_tilt=0, surface_azimuth=180, |
49 | 49 | outputformat='json',
|
50 | 50 | usehorizon=True, userhorizon=None,
|
51 | 51 | pvcalculation=False,
|
@@ -76,9 +76,15 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
|
76 | 76 | Otherwise only global irradiance is returned.
|
77 | 77 | surface_tilt: float, default: 0
|
78 | 78 | Tilt angle from horizontal plane. Ignored for two-axis tracking.
|
79 |
| - surface_azimuth: float, default: 0 |
80 |
| - Orientation (azimuth angle) of the (fixed) plane. 0=south, 90=west, |
81 |
| - -90: east. Ignored for tracking systems. |
| 79 | + surface_azimuth: float, default: 180 |
| 80 | + Orientation (azimuth angle) of the (fixed) plane. Counter-clockwise |
| 81 | + from north (north=0, south=180). This is offset 180 degrees from |
| 82 | + the convention used by PVGIS. Ignored for tracking systems. |
| 83 | +
|
| 84 | + .. versionchanged:: 0.10.0 |
| 85 | + The `surface_azimuth` parameter now follows the pvlib convention, which |
| 86 | + is counterclockwise from north. However, the convention used by the |
| 87 | + PVGIS website and pvlib<=0.9.5 is offset by 180 degrees. |
82 | 88 | usehorizon: bool, default: True
|
83 | 89 | Include effects of horizon
|
84 | 90 | userhorizon: list of float, default: None
|
@@ -144,6 +150,13 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
|
144 | 150 | time stamp convention, e.g., SARAH and SARAH2 provide instantaneous values,
|
145 | 151 | whereas values from ERA5 are averages for the hour.
|
146 | 152 |
|
| 153 | + Warning |
| 154 | + ------- |
| 155 | + The azimuth orientation specified in the output metadata does not |
| 156 | + correspond to the pvlib convention, but is offset 180 degrees. This is |
| 157 | + despite the fact that the input parameter `surface_tilt` has to be |
| 158 | + specified according to the pvlib convention. |
| 159 | +
|
147 | 160 | Notes
|
148 | 161 | -----
|
149 | 162 | data includes the following fields:
|
@@ -191,7 +204,7 @@ def get_pvgis_hourly(latitude, longitude, start=None, end=None,
|
191 | 204 | """ # noqa: E501
|
192 | 205 | # use requests to format the query string by passing params dictionary
|
193 | 206 | params = {'lat': latitude, 'lon': longitude, 'outputformat': outputformat,
|
194 |
| - 'angle': surface_tilt, 'aspect': surface_azimuth, |
| 207 | + 'angle': surface_tilt, 'aspect': surface_azimuth-180, |
195 | 208 | 'pvcalculation': int(pvcalculation),
|
196 | 209 | 'pvtechchoice': pvtechchoice, 'mountingplace': mountingplace,
|
197 | 210 | 'trackingtype': trackingtype, 'components': int(components),
|
@@ -315,6 +328,11 @@ def read_pvgis_hourly(filename, pvgis_format=None, map_variables=True):
|
315 | 328 | metadata : dict
|
316 | 329 | metadata
|
317 | 330 |
|
| 331 | + Warning |
| 332 | + ------- |
| 333 | + The azimuth orientation specified in the output metadata does not |
| 334 | + correspond to the pvlib convention, but is offset 180 degrees. |
| 335 | +
|
318 | 336 | Raises
|
319 | 337 | ------
|
320 | 338 | ValueError
|
|
0 commit comments