Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 12 additions & 11 deletions docs/examples/system-models/oedi_9068.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""
# %%
# This example model uses satellite-based solar resource data from the
# NSRDB PSM3. This approach is useful for pre-construction energy modeling
# NSRDB PSM4. This approach is useful for pre-construction energy modeling
# and in retrospective analyses where the system’s own irradiance
# measurements are not present or unreliable.
#
Expand Down Expand Up @@ -135,17 +135,18 @@
#
# The system does have measured plane-of-array irradiance data, but the
# measurements suffer from row-to-row shading and tracker stalls. In this
# example, we will use weather data taken from the NSRDB PSM3 for the year
# example, we will use weather data taken from the NSRDB PSM4 for the year
# 2019.

api_key = 'DEMO_KEY'
email = 'your_email@domain.com'

keys = ['ghi', 'dni', 'dhi', 'temp_air', 'wind_speed',
'albedo', 'precipitable_water']
psm3, psm3_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude,
psm4, psm4_metadata = pvlib.iotools.get_nsrdb_psm4_conus(latitude, longitude,
api_key, email,
year=2019, interval=5,
year=2019,
time_step=5,
parameters=keys,
map_variables=True,
leap_day=True)
Expand All @@ -167,20 +168,20 @@
# module fraction and returns the average irradiance over the total module
# surface.

solar_position = location.get_solarposition(psm3.index)
solar_position = location.get_solarposition(psm4.index)
tracker_angles = mount.get_orientation(
solar_position['apparent_zenith'],
solar_position['azimuth']
)
dni_extra = pvlib.irradiance.get_extra_radiation(psm3.index)
dni_extra = pvlib.irradiance.get_extra_radiation(psm4.index)

# note: this system is monofacial, so only calculate irradiance for the
# front side:
averaged_irradiance = pvlib.bifacial.infinite_sheds.get_irradiance_poa(
tracker_angles['surface_tilt'], tracker_angles['surface_azimuth'],
solar_position['apparent_zenith'], solar_position['azimuth'],
gcr, axis_height, pitch,
psm3['ghi'], psm3['dhi'], psm3['dni'], psm3['albedo'],
psm4['ghi'], psm4['dhi'], psm4['dni'], psm4['albedo'],
model='haydavies', dni_extra=dni_extra,
)

Expand All @@ -191,14 +192,14 @@

cell_temperature_steady_state = pvlib.temperature.faiman(
poa_global=averaged_irradiance['poa_global'],
temp_air=psm3['temp_air'],
wind_speed=psm3['wind_speed'],
temp_air=psm4['temp_air'],
wind_speed=psm4['wind_speed'],
**temperature_model_parameters,
)

cell_temperature = pvlib.temperature.prilliman(
cell_temperature_steady_state,
psm3['wind_speed'],
psm4['wind_speed'],
unit_mass=module_unit_mass
)

Expand All @@ -215,7 +216,7 @@
'poa_direct': averaged_irradiance['poa_direct'],
'poa_diffuse': averaged_irradiance['poa_diffuse'],
'cell_temperature': cell_temperature,
'precipitable_water': psm3['precipitable_water'], # for the spectral model
'precipitable_water': psm4['precipitable_water'], # for the spectral model
})
model.run_model_from_poa(weather_inputs)

Expand Down
4 changes: 4 additions & 0 deletions docs/sphinx/source/whatsnew/v0.15.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Enhancements
Documentation
~~~~~~~~~~~~~

* Fixed broken ``interval`` keyword argument in the ``oedi_9068`` gallery
example; the correct parameter name is ``time_step``. (:issue:`2791`)


Testing
~~~~~~~
Expand All @@ -42,4 +45,5 @@ Maintenance

Contributors
~~~~~~~~~~~~
* Karl Hill (:ghuser:`karlhillx`)

Loading