Skip to content

Add getter/parser for PVGIS hourly-radiation #1186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 52 commits into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f8e6d6f
Add pvgis.get_pvgis_hourly function
Feb 23, 2021
23b65f7
Update documentation
Feb 27, 2021
53de6fe
Add parser for pvgis_hourly csv and basic
Feb 28, 2021
9e50c6a
Update variable map and documentation
AdamRJensen Mar 7, 2021
a0ad2bb
Update whatsnew, api.rst, and __init__
AdamRJensen Mar 7, 2021
3b41120
Add read_pvgis_hourly
AdamRJensen Mar 7, 2021
dea2a17
Update input and output names
AdamRJensen Jun 13, 2021
1ce1697
Add cams.get_cams_radiation function
Feb 22, 2021
334a997
Revert "Add cams.get_cams_radiation function"
Feb 22, 2021
b416f62
Add requests-mock to CI files
AdamRJensen Jun 13, 2021
fb8e1dc
Revert "Add requests-mock to CI files"
AdamRJensen Jun 16, 2021
0578594
Merge remote-tracking branch 'upstream/master' into pvgis_hourly
AdamRJensen Jun 16, 2021
7612640
Add tests and test files
AdamRJensen Jun 17, 2021
902ed2b
Fix stickler
AdamRJensen Jun 17, 2021
8a3d236
Parametrize read_pvgis_hourly tests
AdamRJensen Jun 17, 2021
b2e7ee3
Add test for metadata assertion
AdamRJensen Jun 17, 2021
a3f54cb
Add test documentation
AdamRJensen Jun 17, 2021
e65bd4c
Fixed minor documentation issues
AdamRJensen Jun 17, 2021
1c03e85
Remove basic parser and add bad extension test
AdamRJensen Jun 17, 2021
7563d28
Add TypeError test and minor doc fixes
AdamRJensen Jun 17, 2021
de6ebc9
Fix stickler
AdamRJensen Jun 17, 2021
8095d61
Fix stickler again
AdamRJensen Jun 17, 2021
9b1ae98
Add tests for get_pvgis_hourly
AdamRJensen Jun 17, 2021
52fa8d2
Add tests for HTTPError message with json
AdamRJensen Jun 17, 2021
ed709cf
Fix documentation issues
AdamRJensen Jun 18, 2021
5b89dba
Update data columns data
AdamRJensen Jun 18, 2021
70e58b3
Change asterisk to dagger symbol in data table
AdamRJensen Jun 18, 2021
76f5849
Update documentation
AdamRJensen Jun 18, 2021
a6e7f36
Rename poa_sky_diffuse and minor doc fixes
AdamRJensen Jun 22, 2021
7fd98f0
Update whatsnew description
AdamRJensen Jun 29, 2021
1223be6
Refactor test_read_pvgis_hourly
AdamRJensen Jun 29, 2021
434b751
Coverage for userhorizon, usehorizon, & optimal_surface_tilt
AdamRJensen Jun 29, 2021
d37f3cc
Add inputs to params dict instead of if statements
AdamRJensen Jun 29, 2021
98fb5f1
Fix stickler
AdamRJensen Jun 29, 2021
cd13cda
Doc. update & refactoring of start/end
AdamRJensen Jul 1, 2021
aad4f4d
Reorder inputs & capitalize input descriptions
AdamRJensen Jul 6, 2021
116c427
Use .strip() instead of replace('\r\n','')
AdamRJensen Jul 6, 2021
1a0f428
Update pvgis.py
AdamRJensen Jul 6, 2021
5ffceda
Raise ValueError for invalid outputformat
AdamRJensen Jul 7, 2021
ff90411
Coverage for bad outputformat
AdamRJensen Jul 7, 2021
0faeeb8
Minor doc fixes
AdamRJensen Jul 7, 2021
919fb8d
Change 'not relevant' to 'ignored'
AdamRJensen Jul 7, 2021
b52a8d9
Have get function call read function, instead of individual parse fun…
AdamRJensen Jul 7, 2021
9db8591
Raise ValueError if no data section is detected
AdamRJensen Jul 7, 2021
cc67fc1
Coverage for empty file passed to read_pvgis_hourly
AdamRJensen Jul 7, 2021
16d9cba
Add info box concerning databases and timestamps
AdamRJensen Jul 13, 2021
bf6712f
Update admonition
AdamRJensen Jul 13, 2021
00139f2
Change admonition style to 'attention'
AdamRJensen Jul 13, 2021
88734c7
Update admonition
AdamRJensen Jul 13, 2021
73d046a
Admonition update
AdamRJensen Jul 13, 2021
84449ac
Fix admonition
AdamRJensen Jul 13, 2021
ac19b9d
Refactor start input
AdamRJensen Jul 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sphinx/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ of sources and file formats relevant to solar energy modeling.
iotools.parse_psm3
iotools.get_pvgis_tmy
iotools.read_pvgis_tmy
iotools.get_pvgis_hourly
iotools.read_pvgis_hourly
iotools.read_bsrn
iotools.get_cams
iotools.read_cams
Expand Down
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ Deprecations

Enhancements
~~~~~~~~~~~~
* Added :func:`~pvlib.iotools.read_pvgis_hourly` and
:func:`~pvlib.iotools.get_pvgis_hourly` for reading and retrieving hourly
solar radiation data and PV power output from PVGIS. (:pull:`1186`,
:issue:`849`)
* Add :func:`~pvlib.iotools.read_bsrn` for reading BSRN solar radiation data
files. (:pull:`1145`, :issue:`1015`)
* Add :func:`~pvlib.iotools.get_cams`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"inputs": {"location": {"latitude": 45.0, "longitude": 8.0, "elevation": 250.0}, "meteo_data": {"radiation_db": "PVGIS-CMSAF", "meteo_db": "ERA-Interim", "year_min": 2013, "year_max": 2014, "use_horizon": true, "horizon_db": null, "horizon_data": "DEM-calculated"}, "mounting_system": {"two_axis": {"slope": {"value": "-", "optimal": "-"}, "azimuth": {"value": "-", "optimal": "-"}}}, "pv_module": {"technology": "CIS", "peak_power": 10.0, "system_loss": 5.0}}, "outputs": {"hourly": [{"time": "20130101:0055", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 3.01, "WS10m": 1.23, "Int": 0.0}, {"time": "20130101:0155", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 2.22, "WS10m": 1.46, "Int": 0.0}, {"time": "20130101:0255", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 1.43, "WS10m": 1.7, "Int": 0.0}, {"time": "20130101:0355", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 0.64, "WS10m": 1.93, "Int": 0.0}, {"time": "20130101:0455", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 0.77, "WS10m": 1.8, "Int": 0.0}, {"time": "20130101:0555", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 0.91, "WS10m": 1.66, "Int": 0.0}, {"time": "20130101:0655", "P": 0.0, "Gb(i)": 0.0, "Gd(i)": 0.0, "Gr(i)": 0.0, "H_sun": 0.0, "T2m": 1.05, "WS10m": 1.53, "Int": 0.0}, {"time": "20130101:0755", "P": 3464.5, "Gb(i)": 270.35, "Gd(i)": 91.27, "Gr(i)": 6.09, "H_sun": 6.12, "T2m": 1.92, "WS10m": 1.44, "Int": 0.0}, {"time": "20130101:0855", "P": 1586.9, "Gb(i)": 80.76, "Gd(i)": 83.95, "Gr(i)": 9.04, "H_sun": 13.28, "T2m": 2.79, "WS10m": 1.36, "Int": 0.0}, {"time": "20130101:0955", "P": 713.3, "Gb(i)": 5.18, "Gd(i)": 70.57, "Gr(i)": 7.31, "H_sun": 18.56, "T2m": 3.66, "WS10m": 1.27, "Int": 0.0}]}, "meta": {"inputs": {"location": {"description": "Selected location", "variables": {"latitude": {"description": "Latitude", "units": "decimal degree"}, "longitude": {"description": "Longitude", "units": "decimal degree"}, "elevation": {"description": "Elevation", "units": "m"}}}, "meteo_data": {"description": "Sources of meteorological data", "variables": {"radiation_db": {"description": "Solar radiation database"}, "meteo_db": {"description": "Database used for meteorological variables other than solar radiation"}, "year_min": {"description": "First year of the calculations"}, "year_max": {"description": "Last year of the calculations"}, "use_horizon": {"description": "Include horizon shadows"}, "horizon_db": {"description": "Source of horizon data"}}}, "mounting_system": {"description": "Mounting system", "choices": "fixed, vertical_axis, inclined_axis, two_axis", "fields": {"slope": {"description": "Inclination angle from the horizontal plane", "units": "degree"}, "azimuth": {"description": "Orientation (azimuth) angle of the (fixed) PV system (0 = S, 90 = W, -90 = E)", "units": "degree"}}}, "pv_module": {"description": "PV module parameters", "variables": {"technology": {"description": "PV technology"}, "peak_power": {"description": "Nominal (peak) power of the PV module", "units": "kW"}, "system_loss": {"description": "Sum of system losses", "units": "%"}}}}, "outputs": {"hourly": {"type": "time series", "timestamp": "hourly averages", "variables": {"P": {"description": "PV system power", "units": "W"}, "Gb(i)": {"description": "Beam (direct) irradiance on the inclined plane (plane of the array)", "units": "W/m2"}, "Gd(i)": {"description": "Diffuse irradiance on the inclined plane (plane of the array)", "units": "W/m2"}, "Gr(i)": {"description": "Reflected irradiance on the inclined plane (plane of the array)", "units": "W/m2"}, "H_sun": {"description": "Sun height", "units": "degree"}, "T2m": {"description": "2-m air temperature", "units": "degree Celsius"}, "WS10m": {"description": "10-m total wind speed", "units": "m/s"}, "Int": {"description": "1 means solar radiation values are reconstructed"}}}}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Latitude (decimal degrees): 45.000
Longitude (decimal degrees): 8.000
Elevation (m): 250
Radiation database: PVGIS-SARAH


Slope: 30 deg.
Azimuth: 0 deg.
time,Gb(i),Gd(i),Gr(i),H_sun,T2m,WS10m,Int
20160101:0010,0.0,0.0,0.0,0.0,3.44,1.43,0.0
20160101:0110,0.0,0.0,0.0,0.0,2.94,1.47,0.0
20160101:0210,0.0,0.0,0.0,0.0,2.43,1.51,0.0
20160101:0310,0.0,0.0,0.0,0.0,1.93,1.54,0.0
20160101:0410,0.0,0.0,0.0,0.0,2.03,1.62,0.0
20160101:0510,0.0,0.0,0.0,0.0,2.14,1.69,0.0
20160101:0610,0.0,0.0,0.0,0.0,2.25,1.77,0.0
20160101:0710,0.0,0.0,0.0,0.0,3.06,1.49,0.0
20160101:0810,26.71,8.28,0.21,8.06,3.87,1.22,1.0
20160101:0910,14.69,5.76,0.16,14.8,4.67,0.95,1.0
20160101:1010,2.19,0.94,0.03,19.54,5.73,0.77,1.0
20160101:1110,2.11,0.94,0.03,21.82,6.79,0.58,1.0
20160101:1210,4.25,1.88,0.05,21.41,7.84,0.4,1.0
20160101:1310,0.0,0.0,0.0,0.0,7.43,0.72,0.0

Gb(i): Beam (direct) irradiance on the inclined plane (plane of the array) (W/m2)
Gd(i): Diffuse irradiance on the inclined plane (plane of the array) (W/m2)
Gr(i): Reflected irradiance on the inclined plane (plane of the array) (W/m2)
H_sun: Sun height (degree)
T2m: 2-m air temperature (degree Celsius)
WS10m: 10-m total wind speed (m/s)
Int: 1 means solar radiation values are reconstructed



PVGIS (c) European Union, 2001-2021
2 changes: 2 additions & 0 deletions pvlib/iotools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from pvlib.iotools.psm3 import read_psm3 # noqa: F401
from pvlib.iotools.psm3 import parse_psm3 # noqa: F401
from pvlib.iotools.pvgis import get_pvgis_tmy, read_pvgis_tmy # noqa: F401
from pvlib.iotools.pvgis import read_pvgis_hourly # noqa: F401
from pvlib.iotools.pvgis import get_pvgis_hourly # noqa: F401
from pvlib.iotools.bsrn import read_bsrn # noqa: F401
from pvlib.iotools.sodapro import get_cams # noqa: F401
from pvlib.iotools.sodapro import read_cams # noqa: F401
Expand Down
Loading