8000 Add gallery example for simple irradiance adjustment for horizon shading by spaneja · Pull Request #1849 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Add gallery example for simple irradiance adjustment for horizon shading #1849

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 20 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
1eadff4
pvgis gallery example
spaneja Sep 7, 2023
cd64985
Merge branch 'pvlib:main' into pvgis_far_shading_example
spaneja Sep 7, 2023
1497f61
name_update
spaneja Sep 7, 2023
f5eaa3c
updates_1
spaneja Sep 8, 2023
b767cd2
Update 2
spaneja Sep 12, 2023
e6fb21e
update 3
spaneja Sep 12, 2023
ccce3eb
Merge branch 'main' into pvgis_far_shading_example
spaneja Sep 13, 2023
8ae6c7e
Update docs/sphinx/source/whatsnew/v0.10.2.rst
spaneja Sep 19, 2023
64f1fe7
8000 Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
8f2bcb0
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
7eb590b
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
48313a0
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
a32abe1
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
73ef12f
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
c123c28
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
ed8a78f
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
3dae6a9
flake8 updates
spaneja Sep 19, 2023
fbf3121
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
1f14b6d
Update docs/examples/shading/plot_simple_irradiance_adjustment_for_ho…
spaneja Sep 19, 2023
62c0595
update
spaneja Sep 19, 2023
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
Prev Previous commit
Next Next commit
update 3
Updated whatsnew file with pull #. Updated formatting and other minor syntax in .py file.
  • Loading branch information
spaneja committed Sep 12, 2023
commit e6fb21ede79467f78023a1ec6c27420a52afbe9e
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# %%
# This example shows how to use horizon elevation angles with
# corresponding horizon azimuth angles for simple horizon shading adjustments.

#
# After location information and a date range is established, solar position
# data is queried from :py:meth:`pvlib.solar_position.get_solar_position`.
# Horizon data is assigned, and interpolated to the solar azimuth time
Expand Down Expand Up @@ -46,6 +46,9 @@
ghi = clearsky.ghi
dhi = clearsky.dhi

# %%
# With basic inputs in place, let's perform the adjustment for horizon shading:

# Use hard-coded horizon profile data from location object above.
horizon_profile = pd.Series([
10.7, 11.8, 11.5, 10.3, 8.0, 6.5, 3.8, 2.3, 2.3, 2.3, 4.6, 8.0, 10.3, 11.1,
Expand All @@ -67,15 +70,11 @@
horizon_elevation_data = pd.Series(horizon_elevation_data, times)

# Adjust DNI based on data - note this is returned as numpy array
dni_adjusted = np.where(
solar_elevation > horizon_elevation_data, dni, 0
)
dni_adjusted = np.where(solar_elevation > horizon_elevation_data, dni, 0)

# Adjust GHI and set it to DHI for time-periods where 'dni_adjusted' is 0.
# Note this is returned as numpy array
ghi_adjusted = np.where(
dni_adjusted == 0, dhi, ghi
)
ghi_adjusted = np.where(dni_adjusted == 0, dhi, ghi)

# Transposition using the original and adjusted irradiance components.
irrad_pre_adj = get_total_irradiance(
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/whatsnew/v0.10.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Documentation
* Update definition of snow events parameter for :py:func:`pvlib.snow.loss_townsend`.
(:issue:`1839`, :pull:`1840`)
* Added gallery example demonstrating how results of :py:func:`pvlib.iotools.get_pvgis_horizon`,
can be processed into time series dni and global poa data.
can be processed into time series dni and global poa data. (:pull:`1849`)

Requirements
~~~~~~~~~~~~
Expand Down
0