diff --git a/docs/examples/system-models/oedi_9068.py b/docs/examples/system-models/oedi_9068.py index 9a73bfa9ce..d2f8f6ae79 100644 --- a/docs/examples/system-models/oedi_9068.py +++ b/docs/examples/system-models/oedi_9068.py @@ -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. # @@ -135,7 +135,7 @@ # # 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' @@ -143,9 +143,10 @@ 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) @@ -167,12 +168,12 @@ # 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: @@ -180,7 +181,7 @@ 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, ) @@ -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 ) @@ -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) diff --git a/docs/sphinx/source/whatsnew/v0.15.3.rst b/docs/sphinx/source/whatsnew/v0.15.3.rst index 87ded069ee..fa03a1dc59 100644 --- a/docs/sphinx/source/whatsnew/v0.15.3.rst +++ b/docs/sphinx/source/whatsnew/v0.15.3.rst @@ -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 ~~~~~~~ @@ -42,4 +45,5 @@ Maintenance Contributors ~~~~~~~~~~~~ +* Karl Hill (:ghuser:`karlhillx`)